Browse Source

version 0.5.2

pysitemap-python-2.7
Kamo Petrosyan 6 years ago
parent
commit
5837e0e226
2 changed files with 6 additions and 2 deletions
  1. +5
    -1
      pysitemap/crawler.py
  2. +1
    -1
      setup.py

+ 5
- 1
pysitemap/crawler.py View File

@ -101,7 +101,11 @@ class Crawler:
self.errlog("Error {} at url {}".format(response.status_code, url))
return
tree = html.fromstring(response.text)
try:
tree = html.fromstring(response.text)
except ValueError as e:
self.errlog(repr(e))
tree = html.fromstring(response.content)
for link_tag in tree.findall('.//a'):
link = link_tag.attrib.get('href', '')
newurl = urlparse.urljoin(self.url, link)


+ 1
- 1
setup.py View File

@ -13,7 +13,7 @@ setup(
version=get_version(
major=0,
minor=5,
build=1,
build=2,
),
packages=find_packages(exclude=EXCLUDE_FROM_PACKAGES),
include_package_data=True,


Loading…
Cancel
Save