2017年12月28日

PEP8规范

摘要: PEP8 Python 编码规范一 代码编排1 缩进。4个空格的缩进(编辑器都可以完成此功能),不使用Tap,更不能混合使用Tap和空格。2 每行最大长度79,换行可以使用反斜杠,最好使用圆括号。换行点要在操作符的后边敲回车。3 类和top-level函数定义之间空两行;类中的方法定义之间空一行;函 阅读全文

posted @ 2017-12-28 15:37 888ewe 阅读(136) 评论(0) 推荐(0)

2017年11月14日

python反爬虫抓取基金应用

摘要: import reimport urllib.requestimport randomuser_agent = ["Mozilla/5.0 (Windows NT 10.0; WOW64)", 'Mozilla/5.0 (Windows NT 6.3; WOW64)', 'Mozilla/5.0 ( 阅读全文

posted @ 2017-11-14 23:24 888ewe 阅读(397) 评论(0) 推荐(0)

python反爬虫抓取

摘要: user_agent = ["Mozilla/5.0 (Windows NT 10.0; WOW64)", 'Mozilla/5.0 (Windows NT 6.3; WOW64)', 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.11 (KHTML, 阅读全文

posted @ 2017-11-14 23:23 888ewe 阅读(198) 评论(0) 推荐(0)

python抓取股票数据

摘要: import urllib.requestimport redef getData(url): return urllib.request.urlopen(url).read().decode("gbk")def getPage(min,max): for page in range(min,max 阅读全文

posted @ 2017-11-14 23:22 888ewe 阅读(963) 评论(0) 推荐(0)

2017年11月12日

python下载资源到本地

摘要: import urllib.requestimport os#下载资源到本地 url 网址 path 本地路径def downLoadPic(url,path): if not os.path.exists(path):#判断本地是否存在文件夹 os.makedirs(path) path=path 阅读全文

posted @ 2017-11-12 18:13 888ewe 阅读(260) 评论(0) 推荐(0)

2017年11月7日

python3抓取超链接

摘要: python3抓取超链接 阅读全文

posted @ 2017-11-07 23:49 888ewe 阅读(917) 评论(0) 推荐(0)

导航