Scrapy--1 Installation and operation

Source: Internet
Author: User

1.Scrapy Installation Issues

Initially, it was installed in the official document directly with PIP, and no error was created when creating the project.

However, when running scrapy crawl dmoz Error hundred/(ㄒoㄒ)/~~ such as:

Importerror:no module named _cffi_backend

unhandled error in Deferred and so on, found to be dependent on the package a lot of not loaded on, go to Baidu install a variety of packages,
There are so many great gods who have summed up all this: worship! ^_^

http://blog.csdn.net/niying/article/details/27103081

http://blog.csdn.net/pleasecallmewhy/article/details/19354723

2. The data was not obtained and it was found that the spelling was wrong.

E:\tutorial>scrapy Crawl Dmoz2015-10-30 13:44:02 [scrapy] info:scrapy 1.0.3started (bot:tutorial)2015-10-30 13:44:02[Scrapy] info:optional features Available:ssl, HTTP112015-10-30 13:44:02 [scrapy] Info:overridden settings: {'Newspider_module':'TuTorial.spiders', 'Spider_modules': ['Tutorial.spiders'], 'Bot_name': 'Tutorial'}2015-10-30 13:44:02[Scrapy] info:enabled Extensions:closespider, Telnetconsole, Logstats, Corestats, Spiderstate2015-10-30 13:44:03[scrapy] info:enabled downloader middlewares:httpauthmiddleware, Downloadtimeoutmiddleware, Useragentmiddleware , Retrymiddleware, Defaultheadersmiddleware, Metarefreshmiddleware, Httpcompressionmiddleware, RedirectMiddleware, Cookiesmiddleware, Chunkedtransfermiddleware, Downloaderstats2015-10-30 13:44:03[scrapy] info:enabled spider middlewares:httperrormiddleware, Offsitemiddleware, Referermiddleware, Urllengthmiddleware, Depthmiddleware2015-10-30 13:44:03[Scrapy] info:enabled Item Pipelines:2015-10-30 13:44:03[Scrapy] Info:spider opened2015-10-30 13:44:03 [scrapy] info:crawled 0 pages (at 0 pages/min), scraped 0 items (at 0 items/min)2015-10-30 13:44:03 [scrapy] debug:telnet console listening on 127.0.0.1:60232015-10-30 13:44:03[scrapy] info:closing spider (finished)2015-10-30 13:44:03[scrapy] info:dumping scrapy stats:{'Finish_reason':'finished', 'Finish_time': Datetime.datetime (2015, 10, 30, 5, 44, 3, 292000), 'Log_count/debug': 1, 'Log_count/info': 7, 'start_time': Datetime.datetime (2015, 10, 30, 5, 44, 3, 282000)}2015-10-30 13:44:03 [scrapy] Info:spider closed (finished)

In the dmoz_spiders.py file in the Spiders directory, Start_urls is written in Start_url, Hey, ╮(╯▽╰)╭

1 start_urls = [2         "http://www.dmoz.org/Computers/Programming/ languages/python/books/",3         "http://www.dmoz.org/ computers/programming/languages/python/resources/"4     ]

Scrapy--1 Installation and operation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.