Why does scrapy throw an error for me when trying to spider and parse a site?

前端 未结 2 1034
离开以前
离开以前 2020-12-16 05:53

The following code

class SiteSpider(BaseSpider):
    name = \"some_site.com\"
    allowed_domains = [\"some_site.com\"]
    start_urls = [
        \"some_sit         


        
2条回答
  •  遥遥无期
    2020-12-16 06:10

    I needed to change BaseSpider to CrawlSpider. Thanks srapy users!

    http://groups.google.com/group/scrapy-users/browse_thread/thread/4adaba51f7bcd0af#

    Hi Bob,

    Perhaps it might work if you change from BaseSpider to CrawlSpider? The BaseSpider seems not implement Rule, see:

    http://doc.scrapy.org/topics/spiders.html?highlight=rule#scrapy.contr...

    -M

提交回复
热议问题