mirror of https://github.com/scrapy/scrapy.git
Merge pull request #1902 from starrify/case-insensitive-robots-txt-for-sitemap
[MRG+1] Added: Making it case-insensitive when extracting sitemap URLs from a robots.txt
This commit is contained in:
commit
642fedb3d6
|
|
@ -39,5 +39,5 @@ def sitemap_urls_from_robots(robots_text):
|
|||
robots.txt file
|
||||
"""
|
||||
for line in robots_text.splitlines():
|
||||
if line.lstrip().startswith('Sitemap:'):
|
||||
if line.lstrip().lower().startswith('sitemap:'):
|
||||
yield line.split(':', 1)[1].strip()
|
||||
|
|
|
|||
Loading…
Reference in New Issue