![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
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 · 2326 阅读 · 0 评论 -
python中append 和extend的区别
append a = [1,2,3] b = [4,5,6] a.append(b) print a 结果: [1, 2, 3, [4, 5, 6]] extend a = [1,2,3] b = [4,5,6] a.extend(b) print a 结果: [1, 2, 3, 4, 5, 6]原创 2019-06-12 17:14:40 · 1180 阅读 · 0 评论 -
把某个文件夹下的图片名称写入txt文件
import os def 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 · 1788 阅读 · 0 评论