Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle fail http request to site #6

Open
Helias opened this issue Jan 27, 2019 · 0 comments
Open

Handle fail http request to site #6

Helias opened this issue Jan 27, 2019 · 0 comments

Comments

@Helias
Copy link
Member

Helias commented Jan 27, 2019

We should add some conditions/check (try/except) to handle the scraping while the site are down.

We should improve the requests retries like: https://stackoverflow.com/questions/15431044/can-i-set-max-retries-for-requests-request

Error log:

HTTPConnectionPool(host='www.dei.unict.it', port=80): Max retries exceeded with url: /Comunicazioni/elenco-eventi_dei (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f0003434710>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))

('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))

urllib3 HTTPError HTTPSConnectionPool(host='api.telegram.org', port=443): Max retries exceeded with url: /bot$TOKEN/sendMessage (Caused by NewConnectionError('<telegram.vendor.ptb_urllib3.urllib3.connection.VerifiedHTTPSConnection object at 0x7f479fc75390>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)) @deinews

This could be also for a temporary offline unict server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant