http downloaders: Provide custom informative User-Agent, do not claim to be "Authenticated access"#5802
Conversation
Christian M. boiled it down to having "-" in the python-requests which started to throw wikipedia off. If we are to change User-Agent, I guess we better make it more informative to start with. Closes datalad#5801
Logic was assuming that any AccessDeniedError which is not AnonymousAccessDeniedError but as the case with wikipedia showed, it is not necessarily the case. So we will instead report "Anonymous" access issue whenever we know it was such. Unfortunately I also found no way to get access to that informative detail wikipedia returns along with its 403, so we will not report more on that
Codecov Report
@@ Coverage Diff @@
## maint #5802 +/- ##
==========================================
- Coverage 90.33% 84.75% -5.59%
==========================================
Files 300 297 -3
Lines 42349 42317 -32
==========================================
- Hits 38258 35865 -2393
- Misses 4091 6452 +2361
Continue to review full report at Codecov.
|
|
This fix works for me! Thanks!
For me it still fails |
|
oh... may be some nice cookie got stored/reused and thus it didn't fail for me? ... odd -- anyways, great to hear that the fix works. |
Closes #5801 although I believe it is no longer an issue -- wikipedia seems to no longer mind any bad User-Agent (at least for me locally as of a few minutes back). But I think it would be nice/proper to provide detailed user-agent string.
See individual commits for more information