
python
jeffery0628
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
scrapy 教程
中文文档:scrapy 4 步:新建项目:(scrapy startproject projectname):新建爬虫项目创建爬虫:scrapy genspider spidername “http://www.xxx.cn/”明确目标:(编写items.py):明确想要抓取的目标制作爬虫:(spiders/xxspider.py):制作爬虫开始爬取的网页编写p...原创 2019-06-12 17:11:53 · 2827 阅读 · 0 评论 -
python中append 和extend的区别
appenda = [1,2,3]b = [4,5,6]a.append(b)print a结果:[1, 2, 3, [4, 5, 6]]extenda = [1,2,3]b = [4,5,6]a.extend(b)print a结果:[1, 2, 3, 4, 5, 6]原创 2019-06-12 17:14:40 · 1232 阅读 · 0 评论 -
把某个文件夹下的图片名称写入txt文件
import osdef ListFilesToTxt(input_dir, file, wildcard, recursion): exts = wildcard.split(" ") for root, subdirs, files in os.walk(input_dir): for name in files: for ext ...原创 2018-09-03 11:20:32 · 1841 阅读 · 0 评论