-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Support redbull.tv's migration to redbull.com #22063
Conversation
…orks URLs that now work: https://www.redbull.com/int-en/episodes/AP-1PMHKJFCW1W11 (working api.redbull.tv/v3/products/, "AP-..." ID) https://www.redbull.com/us-en/events/AP-1XJS6EYM12111/live/AP-1YM8YVH1D2111 (working api.redbull.tv/v3/products/, "rrn:..." ID) URLs that fail: https://www.redbull.com/int-en/films/AP-1ZSMAW8FH2111 (failing api.redbull.tv/v3/products/, "rrn:..." ID)
All tests from 8682f76 work.
The test cases either are dead links or redirect to a URL that RedBullTVIE handles. AFAIK, the only usage of rrn in URLs is now for indicating playlists (rrn:content:collections:...), whose current video is already handled by RedBullTVIE. Playlist support is not currently implemented for this domain, and RedBullTVRrnContentIE is never used with current redbulltv URLs.
Adds support for duration, release_data metadata. Re-implements concatenating subheading onto title if present.
(For optional keys only)
Will this work for links such as https://www.redbull.com/int-en/episodes/sketchy-andy-reel-rock-s01-e03? Also noticed that rrn_id is available within the page by searching for |
Big thanks to @heyjustyn for finding embedUrl. Token query flag removed (doesn't seem to be sent in browser anymore). I'm not sure about the standard for video_id. I'd guess that one should not change it throughout _real_extract, but I'm not sure of a better way if we desire to use rrn_id as the video_id (it seems to be the best identifier).
Awesome job noticing This now works for links like yours above. My apologies for the long response delay. |
Sorry to be the noob in the room but please could someone explain in plain English what this all means? I haven't been able to download WRC coverage for over two years now and every similar reported 'issue' appears to be closed without comment or points to this page. Is there something special I need to do or is it simply still a 'work in progress'? |
@emdubya77, these changes were just merged to master. you can try your link with the next release or build master. |
Thank you, I can confirm this is now working perfectly for me. Many thanks to all involved. |
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:
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
This pull request resolves #22037.
The current RedBull extractors are broken
It appears that redbull.tv has migrated to redbull.com (excepting some API calls). Neither of the two current RedBullTV extractors work for URLs such as https://www.redbull.com/int-en/films/against-the-odds.
The former tests of RedBullTVIE were failing. The URLs of those tests redirect to redbull.com URLs now, and are not handled properly by their extractor. The tests of RedBullTVRrnContentIE also redirect to redbull.com. (All tests also 404 now, but they did not in August 2019 when I wrote the first iteration of this PR.)
I don't believe that RedBull serves URLs with an rrn ID in them any more. Looking at https://www.redbull.com/discover, all video URLs have slugs instead.
Identifying videos with rrn instead of AP
The largest change made by this PR is using the rrn ID to grab the video (and other metadata) rather than the AP ID. Though I was not able to find any documentation RedBull's API, it seems that every video's m3u8 stream can be accessed by its rrn ID, while not all videos have AP IDs.
Subtitles
In the same m3u8 file that holds the formats of a video is a list of subtitle tracks for the video (if any). An example m3u8 with subtitles looks like this:
(The above is from the video https://www.redbull.com/int-en/films/against-the-odds).
As far as I know, youtube-dl does not yet support a method to extract these subtitles (#6144 adds support for this). This would be a good feature to add.
Misc.
I've
flake8
linted this code and ran all tests with Python 2.6.9, 2.7.18, and 3.8.3 with success. Additionally,try_get()
andunified_strdate()
are used when appropriate. This is my first contribution here --- hopefully it follows the guidelines well.Thanks for your work and time!