youtube-dl
youtube-dl copied to clipboard
[TRT] Add extractor for Turkish state TV/Radio
Boilerplate: own code, new extractor
## Please follow the guide belowBefore submitting a pull request make sure you have:
- [x] Searched the bugtracker for similar pull requests
- [x] Read adding new extractor tutorial
- [x] Read youtube-dl coding conventions and adjusted the code to meet them
- [x] Covered the code with tests (note that PRs without tests will be REJECTED)
- [x] Checked the code with flake8
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:
- [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?
- [ ] Bug fix
- [ ] Improvement
- [x] New extractor
- [ ] New feature
Description of your pull request and other information
As requested in #30906, the PR adds support for TRT (Turkish state TV/Radio) at the site https://www.trtizle.com
.
Features
- [x] individual catch-up for TRT shows with URL path
/{cat}/{show}/{episode}
for cat matchingdiziler|programlar|belgesel|filmler|cocuk|trtarsiv|engelsiz
- [x] playlist support for TRT series with URL path
/{cat}/{show}
as above - [x] live stream support for TV channels like
/canli/tv/trt-{chan}
- [x] live stream support for radio channels like `/canli/radyo/{chan}'
- [ ] login support (meanwhile, use
--cookies ...
) - [ ] personal playlist support (
/listem
)
Although the episode and series pages are basically identical, yt-dl has no way (at present) of forcing playlist extraction from an episode page since --yes-playlist
doesn't mean that. You have to remove the episode part of the URL manually to get the series playlist.
To do:
- [ ] test radio channels in region (EPG JSON gives 403 in UK)
- [ ] test TRT-2 in region (manifests give 403 in UK)
- [ ] test TRT-*Spor in region (manifests give 403 in UK)
- [ ] add tests for cats
trtarsiv
,engelsiz
- [ ] add tests for live radio.
To improve extraction, the common routines that process application/ld+json
data are enhanced:
- series name is extracted from data types such as
TVSeries
-
None
values for certain fields no longer overwrite previously extracted values.
Resolves #30906.
@dirkf a very late reply, but I've ran the testcases and it seems to work just fine.