mirror of https://github.com/scrapy/scrapy.git
replace list by generator also in start_requests method of Sitemap
spider
This commit is contained in:
parent
cc7fc33833
commit
f6179a927e
|
|
@ -22,7 +22,7 @@ class SitemapSpider(BaseSpider):
|
|||
self._follow = [regex(x) for x in self.sitemap_follow]
|
||||
|
||||
def start_requests(self):
|
||||
return [Request(x, callback=self._parse_sitemap) for x in self.sitemap_urls]
|
||||
return (Request(x, callback=self._parse_sitemap) for x in self.sitemap_urls)
|
||||
|
||||
def _parse_sitemap(self, response):
|
||||
if response.url.endswith('/robots.txt'):
|
||||
|
|
|
|||
Loading…
Reference in New Issue