-
-
Notifications
You must be signed in to change notification settings - Fork 294
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
Too many redirects error when adding/updating doi.org url #452
Comments
Works fine for me.
The following works too: Maybe a temporary problem. |
No, not just https://doi.org, but full url that points to specific paper like this one: https://doi.org/10.1080/00140139.2013.790485 Here is more correct example:
|
Sorry, I don't think I can do much here. it's a server-side redirect. Probably check with the domain owner why this is happening. |
Well, my browser (Firefox) redirects me correctly. Here is what |
The relevant function is The documentation is here: https://urllib3.readthedocs.io/en/latest/reference/ I tried both the @rachmadaniHaryono and @zmwangx any ideas? |
Similar issue #445. Opening both. |
I can make it work with urllib3 in the way below. I found this workaround here: urllib3/urllib3#1555 (comment) I don't understand is why buku fails after third redirect. Urllib3 default is 10. import logging
import urllib3
import http.client as http_client
http_client.HTTPConnection.debuglevel = 1
logging.basicConfig()
logging.getLogger().setLevel(logging.DEBUG)
logger = logging.getLogger("requests.packages.urllib3")
logger.setLevel(logging.DEBUG)
logger.propagate = True
manager = urllib3.PoolManager()
method = 'GET'
url = 'https://doi.org/10.1080/00140139.2013.790485'
retries = urllib3.util.Retry(redirect=10)
response = manager.request(method, url, retries=retries)
print('status:', response.status) Result:
|
Thank you so much! Fixed at commit d0771a5. |
Adding scientific papers to database using doi.org url often ends in "too many redirects" error. This isn't really buku's fault (I think), but still some inconvenience.
Example url: https://doi.org/10.1080/00140139.2013.790485
Log:
I used
-u
, because I've already added this article to database, but the same happens with-a
option.The text was updated successfully, but these errors were encountered: