LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-10-2020, 12:02 PM   #1
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,252

Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
Youtube-dl, options, and BBC


Everyone knows, I imagine, that BBC does geo-ip filtering, and it's pretty good. youtube-dl has these options
Code:
Geo Restriction:
    --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
Youtube-dl_Supported-sites.html lists
Code:
* bangumi.bilibili.com: BiliBiliM-*M-'
     * bbc: BBC
     * bbc.co.uk: BBC iPlayer
     * bbc.co.uk:article: BBC articles
     * bbc.co.uk:iplayer:playlist
     * bbc.co.uk:playlist
     * BBVTV
Has anyone tried it? with any success?

Last edited by business_kid; 08-10-2020 at 12:07 PM.
 
Old 08-10-2020, 04:25 PM   #2
Geist
Member
 
Registered: Jul 2013
Distribution: Slackware 14 / current
Posts: 442

Rep: Reputation: 196Reputation: 196
I haven't done anything like this in a long time, but I think I had really good success with using tor and then using proxychains to route youtube-dl through it.

I think it was rather easy to set up too, proxychains, that is.
 
Old 08-11-2020, 04:38 AM   #3
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,252

Original Poster
Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
Proxychains? is that a program, or a technique? Do you have a past/present link?
 
Old 08-11-2020, 05:03 AM   #4
timl
Member
 
Registered: Jan 2009
Location: Sydney, Australia
Distribution: Fedora,CentOS
Posts: 750

Rep: Reputation: 156Reputation: 156
I came across the geo options last week and with no luck. I saw a post on their github forum and the responder suggested using a VPN as the best bet.

I guess...watch this space though. I think these options are "bleeding edge" so may need a bit of fine tuning yet.
 
Old 08-11-2020, 07:36 AM   #5
Geist
Member
 
Registered: Jul 2013
Distribution: Slackware 14 / current
Posts: 442

Rep: Reputation: 196Reputation: 196
Quote:
Originally Posted by business_kid View Post
Proxychains? is that a program, or a technique? Do you have a past/present link?
Oh, sorry, it's a program, (github )

I'm on Slackware, the supplementary "SBo" repo has a buildscript for that.
So, if your "user description" still reflects things accurately, then you can find it there.

Anyway, it works with TOR, for which there's also a slackbuild.

However, it seems that YT now refuses TOR connections, but proxychains works with any other proxy, too.
It's configuration file (on Slackware at: /etc/proxychains.conf ) is well documented and it should be easy enough to add your proxy there.

Then all that's left is to run youtube-dl with it at the front.

On Slackware, the binary is called proxychains4
Code:
proxychains4 youtube-dl [OPTIONS] URL
You can put proxychains before all sorts of internet things and they should get routed through the proxy.

Anyway, I would have gone more in depth yesterday but I was running on approximately 4 hours of sleep over almost 3 days of hot hot hot weather.
So...yeah :P
 
Old 08-12-2020, 08:32 AM   #6
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,252

Original Poster
Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
Thanks, Geist.

My "Guru" rating was earned by asking enough questions probably, not by answering them. I keep meaning to demote myself - it sounds atm like I know something.

Tor doesn't work on fooling the BBC geo-ip. I'm not bothered with vpns yet. I might.I don't even know if they work.

Last edited by business_kid; 08-12-2020 at 09:01 AM.
 
Old 08-12-2020, 01:32 PM   #7
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by business_kid View Post
My "Guru" rating was earned by asking enough questions probably, not by answering them. I keep meaning to demote myself - it sounds atm like I know something.
Meant as a joke I'm sure, this sometimes creates real problems/misunderstandings with posters from India.
Joke or not, I find it over-bearing and changed it to LQ Addict immediately. Way more appropriate, since it's defined by number of posts.

Sorry for the OT, back to business (pun? intended?).
 
Old 08-12-2020, 01:37 PM   #8
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Could you give me a GEO-blocked example link to test this? Preferably UK only, I guess?
Whatever magic youtube-dl seems to be capable of employing there, it cannot change the IP address that actually requests a download.
So either it works through some VPN (TOR unlikely, most exit nodes seem to be blocked by those "security" blocklists Google provides freely to anyone who's stupid enough to accept their reign of terror with open arms; btw LQ also uses them) or it doesn't.
 
Old 08-12-2020, 03:46 PM   #9
timl
Member
 
Registered: Jan 2009
Location: Sydney, Australia
Distribution: Fedora,CentOS
Posts: 750

Rep: Reputation: 156Reputation: 156
Quote:
Originally Posted by ondoho View Post
Could you give me a GEO-blocked example link to test this? Preferably UK only, I guess?
Hi, this is blocked via youtube-dl - I am in Australia

https://www.bbc.co.uk/programmes/b0bht4g1

Cheers
 
Old 08-12-2020, 07:33 PM   #10
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,119

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Haven't tried youtube-dl but the beeb recognises my VPN (PIA) even when I use a British or European end-point. Maybe they just know the IPs, or maybe they got smarter 'cause it used to work. Never worried me too much as it's usually just the soccer I'm after, and I can wait till SBS offers it here.
 
Old 08-13-2020, 05:17 AM   #11
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,252

Original Poster
Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
Well, that's odd.

I was going to give you http://www.bbc.co.uk/iplayer or www.channel4.com, which always block, but I got into both of them today. Perhaps it's the fixed IP I now have?
Personally, I don't want the modern stuff, action packed thrillers leaving you with PTSD, or the sex/intrigue/more sex/violence/spiritism/more violence that seems so popular. BBC & channel 4 are good on documentaries, some comedies, sports & entertainment. Also, BBC has no ads; They're inclined to make a 30 minute show last 60 minutes on some channels.
 
Old 08-14-2020, 01:02 AM   #12
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by timl View Post
Hi, this is blocked via youtube-dl - I am in Australia

https://www.bbc.co.uk/programmes/b0bht4g1

Cheers
Code:
$> youtube-dl --geo-bypass  https://www.bbc.co.uk/programmes/b0bht4g1
[bbc.co.uk] b0bht4g1: Downloading video page
[bbc.co.uk] b0bht4g1: Downloading playlist JSON
[bbc.co.uk] m0001qr3: Downloading media selection XML
[bbc.co.uk] m0001qr3: Downloading media selection XML
ERROR: bbc.co.uk returned error: geolocation
$> youtube-dl --geo-bypass-country GB  https://www.bbc.co.uk/programmes/b0bht4g1
[bbc.co.uk] b0bht4g1: Downloading video page
[bbc.co.uk] b0bht4g1: Downloading playlist JSON
[bbc.co.uk] m0001qr3: Downloading media selection XML
[bbc.co.uk] m0001qr3: Downloading media selection XML
ERROR: bbc.co.uk returned error: geolocation
 
Old 08-14-2020, 01:33 PM   #13
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,252

Original Poster
Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
I told you their geo-ip stuff was good. If you do a 'whois' scan on some random ip, one of the things it returns is a country. My IP is in the 92.51.x.x category which was originally given somewhere, but they sold the range to Ireland among others. BBC has me located in Ireland.

Channel4.com uses the same tech.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How To Download A YouTube Playlist And Convert It To MP3 Using youtube-dl LXer Syndicated Linux News 0 10-22-2019 06:04 AM
Youtube videos whose display is too large for the window they are shown in, firefox, youtube-dl and mplayer porphyry5 Linux - General 9 05-24-2018 03:22 PM
LXer: Search YouTube videos on Ubuntu with the YouTube Lens LXer Syndicated Linux News 0 12-30-2011 08:40 PM
LXer: Youtube-dl - Download videos from Youtube in openSUSE LXer Syndicated Linux News 1 08-14-2008 08:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration