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:
Paul Tremberth 2016-04-04 15:23:03 +02:00
commit 642fedb3d6
1 changed files with 1 additions and 1 deletions

View File

@ -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()