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

UserAgentSelector: HTTP mode no longer working #8

Open
MrS0m30n3 opened this issue Jun 8, 2020 · 0 comments
Open

UserAgentSelector: HTTP mode no longer working #8

MrS0m30n3 opened this issue Jun 8, 2020 · 0 comments
Labels

Comments

@MrS0m30n3
Copy link
Owner

When using HTTP mode with the UserAgentSelector, a list with the most common user-agents is retrieved from techblog.willshouse.com.

This options no longer works!

When running all tests, test_load_from_HTTP_nomock fails.

Sending the request manually returns an HTTP error code 503:

import google_translate
reply = google_translate.utils.make_request(google_translate.UserAgentSelector.HTTP_URL)
#Traceback (most recent call last):
#  File "<stdin>", line 1, in <module>
#  File "google_translate/utils.py", line 137, in make_request
#    raise error
#urllib2.HTTPError: HTTP Error 503: Service Temporarily Unavailable

This is due to techblog being behind Cloudburst, which either blocks our requests or sends a redirection which our code does not know how to follow?

For now the workaround is to use UserAgentSelector with either user_agent or user_agent_file options. See this.

Not sure if i am going to fix this, anyway leaving this as a note.

@MrS0m30n3 MrS0m30n3 added the bug label Jun 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant