Browse Source

Fixed #5

pysitemap-python-2.7
Adi Eyal 6 years ago
parent
commit
1ef89fbd37
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      pysitemap/crawler.py

+ 2
- 1
pysitemap/crawler.py View File

@ -113,9 +113,10 @@ class Crawler:
self.errlog(repr(e)) self.errlog(repr(e))
def is_valid(self, url): def is_valid(self, url):
oldurl = url
if '#' in url: if '#' in url:
url = url[:url.find('#')] url = url[:url.find('#')]
if url in self.visited:
if url in self.visited or oldurl in self.visited:
return False return False
if self.url not in url: if self.url not in url:
return False return False


Loading…
Cancel
Save