Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
[bbc.co.uk] geolocation error for some episodes that play in the browser #23933
Comments
|
I ran into this independently a few months ago. As a possible temporary workaround: one thing I noticed is that my browser and youtube-dl were grabbing different streams. Take a look at what streams are being downloaded by your browser using your browser's inspector, and try downloading those with youtube-dl. This worked for me. |
Seems so. And to give YoutubeDL the opportunity to select the same stream as the browser, I added these URLs to
Someone left a comment on It seems there are two variables in the URLs:
For https://www.bbc.co.uk/sounds/play/m0009r5v, all combinations of Someone with more experience in BBC's API could shed more light, but it might be too rare of a problem to worry about. |
|
More inconsistency.
These correspond to a link which is geo-restricted in the browser: https://www.bbc.co.uk/sounds/play/m000c4s4. |
|
I've just tried to download https://www.bbc.co.uk/news/av/health-52494495/coronavirus-r0-what-is-the-r-number-and-why-does-it-matter and had mixed success when I added the two I say mixed because using the above URL directly results in a failure, but resolves the programme id |
|
The code in Instead?
|
|
As observed above the .../6/... playlists are JSON by default while the .../5/... ones are XML. Their parsed contents may not always be the same 5<->6. The .../6/.../format/xml playlists quoted do come as XML for me. |
Checklist
Verbose log
Description
The episodes play in the browser but give a geolocation error in youtube-dl. I think this is because the page uses a URL with
mediaselector/6and youtube-dl usesmediaselector/5(I'm not sure why they'd make one geo-restricted but not the other).This problem happens with episodes of this particular series: https://www.bbc.co.uk/sounds/brand/m0009ql8
Direct links to the episodes:
These mediaselector links (for episode 1) also show a geolocation error in the same browser:
The page in the browser seems to be using a different mediaselector link.
It made two mediaselector requests:
https://open.live.bbc.co.uk/mediaselector/6/select/version/2.0/mediaset/pc/vpid/m0009r5t/format/json/atk/<some hex string>/asn/1/jsfunc/JS_callbacks0https://open.live.bbc.co.uk/mediaselector/6/select/version/2.0/mediaset/pc/vpid/m0009rj6/format/json/atk/<some hex string>/asn/1/jsfunc/JS_callbacks0And this is the response of https://open.live.bbc.co.uk/mediaselector/6/select/version/2.0/mediaset/pc/vpid/m0009r5t in the browser (I shortened some of the links):