now with configuration
This commit is contained in:
parent
65b1520697
commit
34d26f7def
10 changed files with 497 additions and 83 deletions
|
|
@ -175,8 +175,13 @@ class RssFeedSpider(BaseRssFeedSpider):
|
|||
|
||||
name = "rss_spider"
|
||||
|
||||
def __init__(self, urls, **kwargs):
|
||||
self.start_urls = urls
|
||||
def __init__(self, url=None, urls=None, **kwargs):
|
||||
if url is not None:
|
||||
self.start_urls = [url]
|
||||
elif isinstance(urls, str):
|
||||
self.start_urls = [urls]
|
||||
else:
|
||||
self.start_urls = urls or []
|
||||
super().__init__(**kwargs)
|
||||
|
||||
def parse_entry(self, response, feed, entry):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue