-
Notifications
You must be signed in to change notification settings - Fork 9.9k
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
[bbc.co.uk] Try all possible mediaselectors even if one succeeds #26821
Conversation
Some mediaselectors may be parseable but have no formats (eg captions only). This revision tries all possible mediaselectors and assembles the formats and subtitles found. If any formats are found, the known exceptions ('notukerror', 'geolocation', 'selectionunavailable') are not propagated.
Trailing spaces in comments FFS!
The list of subtitles is initialised to None and may never become a list if no captions are found in the playlists.
The subtitles are parsed from each mediaselector playlist in the form of a dict keyed by language each of whose values is a list containing a dict keyed by url and sttl type. There seems to be no attempt in the extractor to make this list contain more than one dict. So a strategy is needed to deal with multiple sttl types for the same language. For backward compatibility, let the first of any duplicate sttl languages take precedence.
I wrote:
No, because code in |
I tried the latest Windows EXE (on OS=Win10). youtube-dl.exe --verbose https://www.bbc.com/news/av/embed/p08fvzqq/52900486 |
At least from the UK, use this URL instead: https://www.bbc.co.uk/programmes/p08fvzq |
This patch has been successfully deployed to a set of Linux-based settop boxes since the PR was created. |
closes ytdl-org#23232 closes ytdl-org#23933 closes ytdl-org#26303 closes ytdl-org#26432 closes ytdl-org#26821 closes ytdl-org#27538
Please follow the guide below
x
into all the boxes [ ] relevant to your pull request (like that [x])Before submitting a pull request make sure you have:
Why isn't there tool for that in the repo? ...
In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:
What is the purpose of your pull request?
Description of your pull request and other information
Some mediaselectors may be parseable but have no formats (eg captions only), eg
https://www.bbc.co.uk/iplayer/episode/b0b3px4q
.This revision tries all possible mediaselectors and assembles the formats and subtitles found.
If any formats are found, the known exceptions ('notukerror', 'geolocation', 'selectionunavailable') are not propagated.
Should help with #23933.
Is there any need to try to de-duplicate formats?