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

IP restricted videos #90

Closed
budg3 opened this issue Aug 6, 2018 · 14 comments
Closed

IP restricted videos #90

budg3 opened this issue Aug 6, 2018 · 14 comments

Comments

@budg3
Copy link

budg3 commented Aug 6, 2018

Found a type of video cipher that deciphers faultily: https://invidio.us/watch?v=sPFb_7jrDVo
It doesn't work with CloudTube either, but I can manage to download it with a dedicated downloading program (JDownloader 2).

Useful links:
https://www.youtube.com/get_video_info?video_id=sPFb_7jrDVo&el=detailpage
https://www.youtube.com/watch?v=sPFb_7jrDVo&spf=prefetch

Edit: Seems to be an IP restricted video. Doesn't work with European IPs, works with American IPs.

@omarroth
Copy link
Contributor

omarroth commented Aug 6, 2018

Appears to be working now, it may have just been that the signature changed and the site took a second to update.

@budg3
Copy link
Author

budg3 commented Aug 6, 2018

Still doesn't work for me:
invidious_pic

@omarroth
Copy link
Contributor

omarroth commented Aug 6, 2018

Very strange, I'm assuming you're getting 403 on /videoplayback? Could you provide one of the sources that Invidious is providing?

@budg3
Copy link
Author

budg3 commented Aug 6, 2018

HD720 mp4:

https://r4---sn-ab5sznlk.googlevideo.com/videoplayback?lmt=1523738127157541&itag=22&key=yt6&mime=video%2Fmp4&ipbits=0&dur=92.577&ms=au%2Conr&mv=m&mt=1533559249&mn=sn-ab5sznlk%2Csn-p5qs7n7z&source=youtube&mm=31%2C26&c=WEB&ratebypass=yes&sparams=dur%2Cei%2Cgcr%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cexpire&id=o-ACfFdAQ7y0XTMovpBnLk61dpAPoqTbGWSD9ZbraQMoC4&initcwndbps=171250&ip=2604%3Aa880%3A400%3Ad1%3A%3A180%3Ad001&ei=JkJoW-CuIMrn8wSmyqjoDA&requiressl=yes&pl=48&gcr=us&fvip=4&expire=1533580934&signature=65BDF8C1A7C53544091228814B172D4A1ACFD91D.3397323744D74EC8275E78915B10BA8497A744B1

Medium Webm

https://r4---sn-ab5sznlk.googlevideo.com/videoplayback?lmt=1523740475075576&itag=43&key=yt6&mime=video%2Fwebm&ipbits=0&dur=0.000&ms=au%2Conr&mv=m&mt=1533559249&mn=sn-ab5sznlk%2Csn-p5qs7n7z&source=youtube&clen=9204728&c=WEB&ratebypass=yes&sparams=clen%2Cdur%2Cei%2Cgcr%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cexpire&id=o-ACfFdAQ7y0XTMovpBnLk61dpAPoqTbGWSD9ZbraQMoC4&mm=31%2C26&initcwndbps=171250&ip=2604%3Aa880%3A400%3Ad1%3A%3A180%3Ad001&ei=JkJoW-CuIMrn8wSmyqjoDA&requiressl=yes&pl=48&gcr=us&fvip=4&gir=yes&expire=1533580934&signature=635080D69F324F6DA7CD7FB91983C7E7A3AEC492.376252091EFD00B631BB2C462CF8F8AD25641625

@omarroth
Copy link
Contributor

omarroth commented Aug 6, 2018

Both those sources work for me. When accessing them directly what error do you get?

@budg3
Copy link
Author

budg3 commented Aug 6, 2018

403 Forbidden. Possible IP restricted video?
I tried with one Netherlands proxy and one German proxy and both failed, worked with an American proxy however.

invidious_proxied

@budg3 budg3 changed the title Ciphered video decipher fail IP restricted videos Aug 6, 2018
@omarroth
Copy link
Contributor

omarroth commented Aug 6, 2018

Using the site above, I can verify that it returns 403 using Netherlands and I can verify that it returns 403 using German proxy. Using a proxy from here though, it appears to work. The issue then may be with YouTube blocking specific proxies, and not the user's IP address.

Another evidence for this is that YouTube lists "DE" and "NL" as allowedRegions (you can see that here), so it would seem strange that it wouldn't allow German IPs to access video content.

@budg3
Copy link
Author

budg3 commented Aug 6, 2018

My unmasked IPs' actual country code is listed in allowedRegions so it's strange alright. User/channel related or a faulty config at google?

@omarroth
Copy link
Contributor

omarroth commented Aug 6, 2018

It's doubly-strange, because YouTube will happily provide /get_video_info to a German/Netherland proxy, but then immediately turn around and give 403 when that proxy attempts to request /videoplayback. The user/channel appears to be fine, so I would assume it's Google attempting to block popular proxies, although I'm having trouble finding a German proxy that even works so I can confirm this.

@narcolepticinsomniac
Copy link

I thought we were circumventing geo-blocking, but I ran into one in the U.S. too:

https://invidio.us/watch?v=xpWu4_hp00M

@omarroth
Copy link
Contributor

omarroth commented Aug 6, 2018

Not currently. I would recommend opening a new issue on geo-restrictions, and we can have a discussion there on how they should be circumvented.

To clarify the distinction: for geo-restricted videos YouTube will not provide download video information to IPs in restricted zones. This issue however is very strange, YouTube will provide valid video information, but give 403s on attempting to access it.

@omarroth
Copy link
Contributor

omarroth commented Aug 9, 2018

I recently found the maker of a userscript has encountered the same issue, with google randomly blocking IP ranges, which seems to indicate a faulty config, like @budg3 said. If so then this issue will probably be closed with #92.

@jeroenev
Copy link

another example: https://invidio.us/watch?v=Vs2StGdkGGI
works fine through youtube from belgium, works fine on invidious using VPN or proxy in US
doesn't work when accessing from invidious from belgium
maybe the googlevideo.com URL is different depending on the region? as a measure to block people from bypassing the youtube website/player when accessing videos?
that would be a plausible explanation, as that would cause invidious to fetch the URL from the country where the invidious server is hosted, which can't be accessed by people watching the video from some other regions

then again why would this only happen on some videos, and not all of them? 🤔

@omarroth
Copy link
Contributor

Closing in favor of #92, since this is caused by a less-restrictive form of geo-blocking, and will be fixed the same way as #92.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants