- 博客(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
213
1
原创 用selenium爬取斗鱼信息
from bs4 import BeautifulSoup from selenium import webdriver class 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
483
原创 爬取腾讯招聘职位列表和详情
from urllib import request from bs4 import BeautifulSoup urls = [] 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
431
原创 在扇贝爬Python的单词
from urllib import request,parse from lxml import etree def sbei(n): url = “https://www.shanbay.com/wordlist/189943/551617/?page=%s”%n a = request.urlopen(url) b = a.read() html = etree.HTML(b) c = ht...
2019-01-31 11:16:09
1118
原创 爬虫入门实操:用代码,模拟操作百度探索
from selenium import webdriver from selenium.webdriver.common.keys import Keys import time #用chrome浏览器,因此搭建它的实例 driver = webdriver.Chrome() url = ‘http://www.baidu.com’ driver.get(url) #得到页面的快照 driver...
2019-01-27 10:17:32
383
原创 一个新建文档的程序
做一个编辑程序,接收用户输入的内容,并且保存为新的文件。如果用户单独输入 *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
223
原创 制作一个银行卡登录系统
制作一个银行卡登录系统 {“expire_date”:“2021-01-01”,“id”:“1234”,“status”:0,“pay_day”:22,“password”:“abc”} 1、用户名为1234.json的文件名 2、判断是否过期 3、登录成功后显示登录成功,若3次登录失败,status值改为1,并且锁定账号。 import os import time import json co...
2019-01-18 15:25:02
801
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅