第一次使用Scrapy就遇到了一个twisted语法错误问题,按理说其实不应该这样,下面记录详细的过程和解决方法
环境:windows10+Python3.7
1、创建scrapy项目
D:\PythonWorkerspace>scrapy startproject xdb
New Scrapy project 'xdb', using template directory 'c:\\python3.7\\lib\\site-packages\\scrapy\\templates\\project', created in:
D:\PythonWorkerspace\xdb
You can start your first spider with:
cd xdb
scrapy genspider example example.com
2、创建spider
D:\PythonWorkerspace>cd xdb
D:\PythonWorkerspace\xdb>dir
驱动器 D 中的卷是 新加卷
卷的序列号是 90B7-EFCF
D:\PythonWorkerspace\xdb 的目录
2018/10/13 06:29 <DIR> .
2018/10/13 06:29 <DIR> ..
2018/10/13 06:29 249 scrapy.cfg
2018/10/13 06:29 <DIR> xdb
1 个文件 249 字节
3 个目录 16,750,272,512 可用字节
D:\PythonWorkerspace\xdb>scrapy genspider chouti dig.chouti.com
Created spider 'chouti' using template 'basic' in module:
xdb.spiders.chouti
D:\PythonWorkerspace\xdb>scrapy genspider cnblogs cnblogs.com
Created spider 'cnblogs' using template 'basic' in module: