![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
技术成长
Billchen1991ai
人工智能爱好者,python晋级中,AI+交易追求者。坐标:广州萝岗科学城。
展开
-
制作一个银行卡登录系统
制作一个银行卡登录系统 {“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 · 695 阅读 · 0 评论 -
一个新建文档的程序
做一个编辑程序,接收用户输入的内容,并且保存为新的文件。如果用户单独输入 *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 · 148 阅读 · 0 评论 -
爬取腾讯招聘职位列表和详情
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 · 329 阅读 · 0 评论 -
爬虫入门实操:用代码,模拟操作百度探索
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 · 275 阅读 · 0 评论 -
用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 · 368 阅读 · 0 评论 -
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 · 107 阅读 · 1 评论 -
在扇贝爬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 · 1017 阅读 · 0 评论