https://www.lfd.uci.edu/~gohlke/pythonlibs/
deepin+python3.7环境下,scrapy项目的开启
root@kong-PC:/Python-3.7.1# python3 -m scrapy startproject ScrapySpider
New Scrapy project 'ScrapySpider', using template directory '/usr/local/lib/python3.6/dist-packages/scrapy/templates/project', created in:
/Python-3.7.1/ScrapySpider
You can start your first spider with:
cd ScrapySpider
scrapy genspider example example.com
python3 -m scrapy startproject first
cd first
scrapy genspider -t basic spider_csdn csdn.net
scrapy genspider -l
Available templates:
basic
crawl
csvfeed
xmlfeed
main.py #调用文件
_author_ = "kong"
from scrapy.cmdline import execute
import sys
import os
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
execute(['scrapy','crawl','first'])
#用户切换 su kong
#切换成root sudo su