[Notes] Python self Scrapy reptiles project creation & Code

[Notes] Python self Scrapy reptiles project creation & Code

  • Create a crawler Project -> required by code to create a terminal (cmd / Terminal) in
    -> cd into the directory created project

scrapy startproject xxx # xxx是您需要创建爬虫项目的名称
cd xxx # 进入刚刚创建的爬虫项目目录
# 创建一只爬虫 注意:爬虫名不能和前面的爬虫项目名字相同!
scrapy genspider 爬虫名 域名
scrapy crawl 爬虫名 # 启动爬虫

Released nine original articles · won praise 7 · views 227

Guess you like

Origin blog.csdn.net/weixin_44906836/article/details/103973023