You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes one of my feeds has a redirect bug and the script crashes:
Traceback (most recent call last):
File "/usr/local/bin/trackthenews", line 10, in <module>
sys.exit(main())
File "/usr/local/lib/python3.7/site-packages/trackthenews/core.py", line 420, in main
articles = parse_feed(outlet, url, delicate, redirects)
File "/usr/local/lib/python3.7/site-packages/trackthenews/core.py", line 188, in parse_feed
article = Article(outlet, title, url, delicate, redirects)
File "/usr/local/lib/python3.7/site-packages/trackthenews/core.py", line 43, in __init__
self.canonicalize_url()
File "/usr/local/lib/python3.7/site-packages/trackthenews/core.py", line 54, in canonicalize_url
res = requests.head(self.url, allow_redirects=True, timeout=30)
File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 98, in head
return request('head', url, **kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 640, in send
history = [resp for resp in gen] if allow_redirects else []
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 640, in <listcomp>
history = [resp for resp in gen] if allow_redirects else []
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 140, in resolve_redirects
raise TooManyRedirects('Exceeded %s redirects.' % self.max_redirects, response=resp)
It would be better if this error was reported but ignored.
The text was updated successfully, but these errors were encountered:
Sometimes one of my feeds has a redirect bug and the script crashes:
It would be better if this error was reported but ignored.
The text was updated successfully, but these errors were encountered: