From 1c55865aa9a801ce2663bbbad17b58361342b98c Mon Sep 17 00:00:00 2001 From: Kamo Petrosyan Date: Wed, 13 Jan 2016 00:02:16 +0600 Subject: [PATCH] removes anchor links --- pysitemap/crawler.py | 2 ++ setup.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pysitemap/crawler.py b/pysitemap/crawler.py index 6608dfa..c48a7bd 100644 --- a/pysitemap/crawler.py +++ b/pysitemap/crawler.py @@ -101,6 +101,8 @@ class Crawler: def is_valid(self, url): valid = False + if '#' in url: + url = url[:url.find('#')] if url in self.visited: return False if not self.url in url: diff --git a/setup.py b/setup.py index b4c0397..6d59d45 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setup( version=get_version( major=0, minor=3, - build=8, + build=9, ), packages=find_packages(exclude=EXCLUDE_FROM_PACKAGES), include_package_data=True,