-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
[prosieben] Endless redirect, failure to download on austrian IP #22288
Comments
I think the problem is the X-Forwarded-For header. It is (always) set to a German IP (53.107.178.173 in the output above) by youtube-dl. But when you try to download with an Austrian IP you get in this redirect loop and it doesn't work. Not setting this header field at all solves the problem for me. |
@dstftw cant-reproduce -> Does this mean that I have to fix it myself and then submit a PR or that it is not going to be fixed at all, or... ? |
I think this problem could be easily fixed by removing the _GEO_COUNTRIES restriction implemented in the prosiebensat1 extractor, e.g. by removing line 19 (https://github.com/ytdl-org/youtube-dl/blob/master/youtube_dl/extractor/prosiebensat1.py#L19). But I don't know why this is there in the first place and if removing it would break downloads for other (officially unsupported) countries. |
How about adding 'AT' ? |
I don't think this would work as expected. If there are multiple countries defined a random one gets selected. Therefore it would only work if you have "luck" (hey, fifty-fifty are good odds), or if you call the command multiple times until it works. Additionally this would maybe create the same problem for users with a German IP. Off the cuff I can think of multiple ways of solving this problem:
Unfortunately I don't really know the code base, I just clicked through a bunch of files to find the root of this problem. Therefore I don't know if other plugins/extractors already had a similar problem and if there are already solutions available. Maybe the (original) developer of the prosiebensat1 plugin/extractor can weigh in? Additionally it would be interesting if this problem also exists for users with a Swiss IP. |
Thanks, @mpra. I am now confident that this is not actually a bug but a configuration issue. I will probably resort to manual tuning of geo-restriction by using --no-geo-bypass or similar flag. I have tested this and it is working as intended. I no longer think that this is a bug and therefore am closing. There could be an argument for trying to download without geo-restrictions if an endless loop is detected. |
I wouldn't say that. I think it's indeed a bug, because the geo bypass mechanism, which should allow more users to download stuff, breaks download for others. But using the "--no-geo-bypass" flag is a viable and easy workaround. |
Would you like me to leave the issue open? |
Checklist
Verbose log
Description
The site https://www.prosieben.de redirects users from Austria to https://www.prosieben.at which might be the reason that this results in a endless loop.
Using an IP in Germany (ssh on server) shows no errors. I am using Ubuntu 19.04 with Xubuntu packages.
The text was updated successfully, but these errors were encountered: