mirror of https://github.com/scrapy/scrapy.git
Updated documentation of spider arguments to include required super call.
This commit is contained in:
parent
891fa980d2
commit
e12b689c4f
|
|
@ -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`_.
|
||||
|
|
|
|||
Loading…
Reference in New Issue