- Reference link: https://www.zhihu.com/question/28565716 (eclipse+pydev configuration)
- Reference link: http://www.cnblogs.com/kongzhagen/p/6549053.html (scrapy crawler Simple example)
1. Create a new Python project via Eclipse+pydev
Set up
2. You can create a project from the Scrapy command line to the newly built Eclipse project:/users/it-0003005/documents/workspace/testscrapy1 or copy a scrapy item directly into this directory. A. A new Scrapy project was created
it-0003005mac:~ it-0003005$ cd/users/it-0003005/documents/workspace/testscrapy1
It-0003005mac:testscrapy1 it-0003005$ scrapy startproject pic
2017-08-19 04:47:13 [scrapy] info:scrapy 1.0.3 started (Bot:scrapybot)
2017-08-19 04:47:13 [Scrapy] info:optional features Available:ssl, HTTP11
2017-08-19 04:47:13 [scrapy] Info:overridden settings: {}
New scrapy project ' pic ' created in:
/users/it-0003005/documents/workspace/testscrapy1/pic
You can start your first spider with:
CD pic
Scrapy Genspider Example example.com
It-0003005mac:testscrapy1 it-0003005$ CD pic
It-0003005mac:pic it-0003005$ scrapy genspider xh xiaohuar.com
Created spider ' xh ' using template ' Basic ' in module:
Pic.spiders.xh
B. Refreshing a project at eclipse
3. Configure the compilation options for Eclipse
Run, run configurations, delete the old configuration file under Python Run and create a new one.
How to run the Scrapy project in Eclipse+pydev