Scrapy domain_name for spider

Posted by Zeynel on Stack Overflow See other posts from Stack Overflow or by Zeynel
Published on 2009-11-26T16:38:28Z Indexed on 2010/04/10 23:03 UTC
Read the original article Hit count: 481

Filed under:
|

From the Scrapy tutorial:

domain_name: identifies the Spider. It must be unique, that is, you can’t set the same domain name for different Spiders.

Does this mean that domain_name must be a valid domain name, like

domain_name = 'example.com'

Or can I name

domain_name = 'ex1'

The problem is I had a spider that worked with domain name

domain_name = 'whitecase.com'

Now I created a new spider as an instance of CrawlSpider and named it

domain_name = 'wc2'

but I am getting the error "could not find spider for domain "wc2""

© Stack Overflow or respective owner

Related posts about scrapy

Related posts about python