yt-dlp icon indicating copy to clipboard operation
yt-dlp copied to clipboard

Add support for live truTV streams

Open ischmidt20 opened this issue 10 months ago • 3 comments

IMPORTANT: PRs without the template will be CLOSED

Description of your pull request and other information

Adds support to the tbs extractor for live truTV streams (e.g., https://www.trutv.com/watchtrutv/east). To be honest, this might belong in the separate truTV extractor, but as the TNT live streams were already here, it was easier for me to follow along to add truTV.

Template

Before submitting a pull request make sure you have:

In order to be accepted and merged into yt-dlp each piece of code must be in public domain or released under Unlicense. Check all of the following options that apply:

  • [x] I am the original author of this code and I am willing to release it under Unlicense
  • [ ] 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?

ischmidt20 avatar Apr 14 '24 01:04 ischmidt20

Is there an open issue for this? And pls add a test

pukkandan avatar Apr 14 '24 03:04 pukkandan

No open issue, I just noticed it myself because truTV follows same format as TBS and TNT but extractor was only set up to handle TBS/TNT. Adding test shortly

ischmidt20 avatar Apr 16 '24 22:04 ischmidt20

It looks like truTV has adopted the same backend and URL format as TBS/TNT for its episodes and clips as well. The other extractor in trutv.py is obsolete: there is no way to find URLs on the trutv website that are matched by the old extractor; however, the old API seems to be still operational in a legacy capacity and thus the old extractor's test still works.

It's probably not necessary to remove the old trutv extractor yet, but perhaps we should add a comment to clarify its situation. And we should probably return _old_archive_ids in the TBS extractor if site == trutv since the video IDs appear to be the same as before

bashonly avatar May 08 '24 22:05 bashonly

What else needs to happen for this PR to be merged?

ischmidt20 avatar Sep 02 '24 14:09 ischmidt20

I seem to recall testing this before I was going to merge it and I kept getting errors: simulated extraction would work but it would fail for me at the download stage. Could you provide a log of a successful download?

bashonly avatar Sep 02 '24 17:09 bashonly