python-sitemap
python-sitemap copied to clipboard
AttributeError: 'NoneType' object has no attribute 'geturl'
I got such error python3 main.py --domain https://domain.com --output sitemap.xml
Traceback (most recent call last):
File "main.py", line 60, in
Interesting what is your Python version please ?
Python 3.8.2
It is showing on pdf file url exist. So content might be not parseable and response will be None.
Need add condition in final_url = response.geturl() like
final_url = response.geturl() if response is not None else current_url
I create a PR #77
It is showing on pdf file url exist. So content might be not parseable and response will be None.
Need add condition in
final_url = response.geturl()likefinal_url = response.geturl() if response is not None else current_urlI create a PR #77
Please help me figure out in which file exactly which line to insert, what to exclude the specified error?