python crawler frame scrapy two operating methods

runspider file name and reptiles  crawl reptile name

Four, runspider

Run Spider except: scrapy crawl XX addition , we can use: runspider, the former is running the project based, which is run file-based, which means that you write a py file format scrapy in accordance with the spider , you do not want to create project, then you can use runspider, for example, you write a: scrapyd_cn.py spider, you want to run is direct:

scrapy runspider scrapy_cn.py

Guess you like

Origin www.cnblogs.com/stillstep/p/11100098.html