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

前端 未结 2 1036
离开以前
离开以前 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:07

    By default scrapy searches for parse function in the class. Here in your spider, parse function is missing. Instead of parse you have given parse_item. The problem will be solved if parse_item is replace with parse. Or you can override the parse method in spider.py with that of parse_item.

提交回复
热议问题