alexmercerind / youtube-search-python

🔎 Search for YouTube videos, channels & playlists. Get 🎞 video & 📑 playlist info using link. Get search suggestions. WITHOUT YouTube Data API v3.
MIT License
742 stars 164 forks source link

Add geo location bypass option #86

Open ricardofunke opened 3 years ago

ricardofunke commented 3 years ago

youtube-dl tool has some options to bypass geo location by faking X-Forward-For http headers, for example:

    --geo-verification-proxy URL         Use this proxy to verify the IP address for some geo-restricted sites. The default proxy specified by --proxy (or none, if the option is not present) is used for the actual downloading.
    --geo-bypass                         Bypass geographic restriction via faking X-Forwarded-For HTTP header
    --no-geo-bypass                      Do not bypass geographic restriction via faking X-Forwarded-For HTTP header
    --geo-bypass-country CODE            Force bypass geographic restriction with explicitly provided two-letter ISO 3166-2 country code
    --geo-bypass-ip-block IP_BLOCK       Force bypass geographic restriction with explicitly provided IP block in CIDR notation

So maybe we can have something like that for the youtube-search-python as well?

mytja commented 2 years ago

Sorry, but I have no interest in reverse-engineering youtube-dl just for this header. I know, there exists an MDN page about this HTTP header, but I just don't have the interest needed. In the end, I'd be happy to accept pull requests. Marking this as good first issue and help wanted.