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

[TubiTv] Extractor overhaul #32945

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

dirkf
Copy link
Contributor

@dirkf dirkf commented Oct 8, 2024

Boilerplate: own/yt-dlp code, bug fix/improvement

Please follow the guide below

  • You will be asked some questions, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your pull request (like that [x])
  • Use Preview tab to see how your pull request will actually look like

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:

  • I am the original author of this code and I am willing to release it under Unlicense, except for code from yt-dlp for which this or the below has already been asserted.
  • I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

  • Bug fix
  • Improvement
  • New extractor
  • New feature

Description of your pull request and other information

This PR updates the extractor for tubitv.com and adds a series/season extractor.

The PR includes these features back-ported from yt-dlp:

Breaking change: TubiTvIE no longer recognises the URL scheme tubitv:{id}; instead, use https://tubitv.com/tv-shows/{id}/.

Rationale for modifying TubiTvShowIE extraction tactic is here.

* back-port login and extraction from yt-dlp
* further extract uploader, age_limit, cast, categories, series
@3052
Copy link

3052 commented Oct 11, 2024

I believe most or all Tubi stuff is DRM:

17:37:00 INFO GET URL="https://akamai2.tubi.video/88b7ef51-54f9-48fe-8943-634b31fb0f44/fgj9amb521.mpd?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjZG5fcHJlZml4IjoiaHR0cHM6Ly9ha2FtYWkyLnR1YmkudmlkZW8iLCJleHAiOjE3MjkwMDQ0MDAsIm1lZGlhX3NpZyI6ODM4MTIzOTB9.wJ3PsGRl7folpvvi-oOBo9CL1K1LIzRJEc8pr75lvwQ"
17:37:00 INFO GET URL=https://akamai2.tubi.video/88b7ef51-54f9-48fe-8943-634b31fb0f44/mvxj2g5x.mp4
17:37:01 INFO POST URL="https://license.adrise.tv/challenge?platform=android&type=widevine&external_id=438575BA9647B98CF82164CF3E4BC1A2&drm_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhbmFsb2dfb3V0IjoiY2dtc19yZXF1aXJlZCIsImV4cCI6MTcyODkxODAwMCwiaGRjcCI6InYxIiwicHJfc2VjdXJpdHlfbGV2ZWwiOjIwMDAsInd2X3NlY3VyaXR5X2xldmVsIjoxfQ.hrFNoerXHtlutTlAcNO8TmV76_T44PtyQMP3o__V8H4"
17:37:01 INFO CDM PSSH=EhBDyrHXYe5CxLbpnTq8PM9ESOPclZsG key="+b3knU8vB5kYz1NhNAAQSw=="
17:37:01 INFO GET URL=https://akamai2.tubi.video/88b7ef51-54f9-48fe-8943-634b31fb0f44/mvxj2g5x.mp4
17:37:02 INFO 0.54 % size="8.39 megabyte" rate="8.37 megabyte/s"

@dirkf
Copy link
Contributor Author

dirkf commented Oct 12, 2024

Probably so, but the test videos here are examples of unprotected content.

@3052
Copy link

3052 commented Oct 12, 2024

huh actually maybe I am wrong - this one uses DRM

https://tubitv.com/movies/100003987/casino

but if you disable Widevine it still works. OK never mind. this one use DRM:

https://tubitv.com/movies/679215/the-three-stooges-meet-hercules

and if you disable Widevine it wont play

@dirkf
Copy link
Contributor Author

dirkf commented Oct 12, 2024

Maybe 100003987 has some, perhaps higher res, formats with DRM. The extractor is meant to ignore those if playable formats are found.

Pls feel free to test this PR against it (requires US IP, or Content Unavailable).

@Ashish0804
Copy link

Tubi was in process of adding DRM when i was working on the extractor. dlp has checks to auto ignore drm material and hence we didn't bother much to explicitly handle it.

Might want to check how dl treats drm content.
Also tubi has (had) alternative endpoint to provide drm-free in pisspoor quality back then, mainly for TVs. Might want to check if that endpoint is still up.

@3052
Copy link

3052 commented Oct 14, 2024

Also tubi has (had) alternative endpoint to provide drm-free in pisspoor quality back then, mainly for TVs. Might want to check if that endpoint is still up.

Ive checked, its not.

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

Successfully merging this pull request may close these issues.

3 participants