随笔分类 -  Python总结

python爬虫抓取网站的一些总结技巧
摘要:学用python也有3个多月了,用得最多的还是各类爬虫脚本:写过抓代理本机验证的脚本,写过在discuz论坛中自动登录自动发贴的脚本,写过自动收邮件的脚本,写过简单的验证码识别的脚本,本来想写google music的抓取脚本的,结果有了强大的gmbox,也就不用写了。 这些脚本有一个共性,都是和w 阅读全文
posted @ 2018-03-20 17:49 vsmart 阅读(5467) 评论(0) 推荐(0)
VIM 常用命令
摘要:set enc=utf-8i: 在光标前插入a: 在光标后插入I: 在光标所处在的行的行首A: 在光标所处的行的末尾o: 在光标所处的行的下一行 行首O: 在光标所处的行的上一行 行首w: 保存q: 退出x: 保存并退出命令行模式:yy: 复制p: 粘贴h: 上j: 下k: 上l: 右x: 删除光标 阅读全文
posted @ 2017-11-07 04:57 vsmart 阅读(204) 评论(0) 推荐(0)
python3 简单抓取图片2
摘要:import urllib.requestimport reresponse = urllib.request.urlopen("http://tieba.baidu.com/p/2460150866")page = response.read()page = page.decode('utf-8' 阅读全文
posted @ 2017-11-01 23:04 vsmart 阅读(243) 评论(0) 推荐(0)
python3 抓取图片
摘要:import reimport urllib.request# import urllibimport osdef getHtml(url): page = urllib.request.urlopen(url) html = page.read() return html.decode('UTF- 阅读全文
posted @ 2017-11-01 22:40 vsmart 阅读(321) 评论(0) 推荐(0)
VIM 基本命令
摘要:set enc=utf-8i: 在光标前插入a: 在光标后插入I: 在光标所处在的行的行首A: 在光标所处的行的末尾o: 在光标所处的行的下一行 行首O: 在光标所处的行的上一行 行首w: 保存q: 退出x: 保存并退出命令行模式:yy: 复制p: 粘贴h: 上j: 下k: 上l: 右x: 删除光标 阅读全文
posted @ 2017-10-24 05:30 vsmart 阅读(205) 评论(0) 推荐(0)
python3 简单抓取网页
摘要:import urllib.requestresp=urllib.request.urlopen("http://fanyi.baidu.com/")html=resp.read()html = html.decode("utf-8")print (html) 阅读全文
posted @ 2017-08-19 07:34 vsmart 阅读(201) 评论(0) 推荐(0)