1 进入项目目录,在命令行输入
1.1 scrapy startprojet 项目名称,如:
scrapy startproject tutorial

1.2 生成以下目录文件

2 创建爬虫文件,根据命令行提示

2.1 输入 cd tutorial

2.2 输入scrapy genspider 爬虫名称 网址,如
scrapy genspider quote http://quotes.toscrape.com


3 修改爬虫文件

4 运行爬虫
scrapy crawl quote


网友评论