配置scrapy环境
分别pip install Zope.Interface、Twisted、w3lib、lxml、pyOpenSSL、Scrapy
新建爬虫项目,pycharm运行
我的项目名称为RadioCrawl
文件夹为
新建main.pyfrom scrapy import cmdline
cmdline.execute("scrapy crawl playlist".split())
表示用命令行的方式执行我的名为playlist的爬虫程序
用pycharm打开项目
打开Edit Configurations
调试
可以在其他代码中设置断点,debug运行