Updated documentation of spider arguments to include required super call.

This commit is contained in:
Dan 2013-07-16 14:26:53 -04:00
parent 891fa980d2
commit e12b689c4f
1 changed files with 2 additions and 1 deletions

View File

@ -61,9 +61,10 @@ Spiders receive arguments in their constructors::
class MySpider(BaseSpider):
name = 'myspider'
def __init__(self, category=None):
def __init__(self, category=None, *args, **kwargs):
self.start_urls = ['http://www.example.com/categories/%s' % category]
# ...
super(MySpider, self).__init__(*args, **kwargs)
Spider arguments can also be passed through the Scrapyd ``schedule.json`` API.
See `Scrapyd documentation`_.