yt-dlp
yt-dlp copied to clipboard
Add support for live truTV streams
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:
- [x] At least skimmed through contributing guidelines including yt-dlp coding conventions
- [x] Searched the bugtracker for similar pull requests
- [x] Checked the code with flake8 and ran relevant tests
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?
- [x] Fix or improvement to an extractor (Make sure to add/update tests)
- [ ] New extractor (Piracy websites will not be accepted)
- [ ] Core bug fix/improvement
- [ ] New feature (It is strongly recommended to open an issue first)
Is there an open issue for this? And pls add a test
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
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
What else needs to happen for this PR to be merged?
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?