- 博客(7)
- 收藏
- 关注
翻译 import this
Beautiful is better than ugly.Explicit is better than implicit.Simple is better than complex.Complex is better than complicated.Flat is better than nested.Sparse is better than dense.Readability...
2019-02-21 22:34:19 106 1
原创 用selenium爬取斗鱼信息
from bs4 import BeautifulSoupfrom selenium import webdriverclass Dyu():def setUp(self):self.driver = webdriver.Chrome()self.url = “https://www.douyu.com/directory/all”def douyu(self): self....
2019-02-01 10:40:33 366
原创 爬取腾讯招聘职位列表和详情
from urllib import requestfrom bs4 import BeautifulSoupurls = []def qq():url = “https://hr.tencent.com/position.php?keywords=python&lid=2196&tid=87”a = request.urlopen(url)b = a.read()s...
2019-01-31 14:02:42 328
原创 在扇贝爬Python的单词
from urllib import request,parsefrom lxml import etreedef sbei(n):url = “https://www.shanbay.com/wordlist/189943/551617/?page=%s”%na = request.urlopen(url)b = a.read()html = etree.HTML(b)c = ht...
2019-01-31 11:16:09 1015
原创 爬虫入门实操:用代码,模拟操作百度探索
from selenium import webdriverfrom selenium.webdriver.common.keys import Keysimport time#用chrome浏览器,因此搭建它的实例driver = webdriver.Chrome()url = ‘http://www.baidu.com’driver.get(url)#得到页面的快照driver...
2019-01-27 10:17:32 273
原创 一个新建文档的程序
做一个编辑程序,接收用户输入的内容,并且保存为新的文件。如果用户单独输入 *w,表示文件保存退出。file_name = input(‘请输入文件名:’)def file_write(file_name):f = open(file_name,‘w’)while True:a = input(‘请输入内容:’)if a != ‘*w’:f.write(’{}\n’.format(a)...
2019-01-18 18:11:57 145
原创 制作一个银行卡登录系统
制作一个银行卡登录系统{“expire_date”:“2021-01-01”,“id”:“1234”,“status”:0,“pay_day”:22,“password”:“abc”}1、用户名为1234.json的文件名2、判断是否过期3、登录成功后显示登录成功,若3次登录失败,status值改为1,并且锁定账号。import osimport timeimport jsonco...
2019-01-18 15:25:02 688
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人