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

[TRT] Add extractor for Turkish state TV/Radio #30921

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

Conversation

dirkf
Copy link
Contributor

@dirkf dirkf commented May 6, 2022

Boilerplate: own code, new extractor ## Please follow the guide below

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
  • 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

As requested in #30906, the PR adds support for TRT (Turkish state TV/Radio) at the site https://www.trtizle.com.

Features

  • individual catch-up for TRT shows with URL path /{cat}/{show}/{episode} for cat matching diziler|programlar|belgesel|filmler|cocuk|trtarsiv|engelsiz
  • playlist support for TRT series with URL path /{cat}/{show} as above
  • live stream support for TV channels like /canli/tv/trt-{chan}
  • 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.

@ahmetlii
Copy link

ahmetlii commented Nov 12, 2022

@dirkf a very late reply, but I've ran the testcases and it seems to work just fine.

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.

Add support for TRT İzle
2 participants