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

Forward "BBC sounds" URL to "programmes" URL #19200

Closed
utack opened this issue Feb 12, 2019 · 1 comment
Closed

Forward "BBC sounds" URL to "programmes" URL #19200

utack opened this issue Feb 12, 2019 · 1 comment

Comments

@utack
Copy link

@utack utack commented Feb 12, 2019

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2019.02.08. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2019.02.08

Before submitting an issue make sure you have:

  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones
  • Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

BBC seems to have two URLs for their radio programmes
https://www.bbc.co.uk/programmes/[id]
and
https://www.bbc.co.uk/sounds/play/[id]
Example
https://www.bbc.co.uk/programmes/m0002d1w
https://www.bbc.co.uk/sounds/play/m0002d1w

Right now the latter gives an error in Youtube-dl, I think it should be forwarded to the former automatically
Thank you for consideration!

@barsnick
Copy link

@barsnick barsnick commented Apr 12, 2019

Basically, this only requires an update of the URI regex:

diff --git a/youtube_dl/extractor/bbc.py b/youtube_dl/extractor/bbc.py
index eac9a5a46..0177eb6dc 100644
--- a/youtube_dl/extractor/bbc.py
+++ b/youtube_dl/extractor/bbc.py
@@ -38,6 +38,7 @@ class BBCCoUkIE(InfoExtractor):
                             iplayer(?:/[^/]+)?/(?:episode/|playlist/)|
                             music/(?:clips|audiovideo/popular)[/#]|
                             radio/player/|
+                            sounds/play/|
                             events/[^/]+/play/[^/]+/
                         )
                         (?P<id>%s)(?!/(?:episodes|broadcasts|clips))

(No, I am not creating a PR, because it means I need to add a test, re-run all existing tests, fix existing tests, figure out how to test tests which require a login and may have been broken. And investigate, whether the added regex is sufficient, or should be more general or specific. This is just a hint at what needs to be fixed in the most simple case. ;-))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.