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

[extractor/rozhlas] Add MujRozhlas extractor #7129

Merged
merged 9 commits into from
Jun 7, 2023

Conversation

stanoarn
Copy link
Contributor

@stanoarn stanoarn commented May 26, 2023

IMPORTANT: PRs without the template will be CLOSED

Description of your pull request and other information

This PR refactors some code from the old RozhlasVltavaIE. This is mainly done so that some of its code can be reused for a new MujRozhlasIE. This new extractor allows for the extraction of data from mujrozhlas.cz. While the data is mostly extractable with the old extractor, the new one is able fetch some addition information (e.g. upload dates) and also works on a different website. The underlying API is the same, but I haven't been able to figure out a way to unify the extraction process.

Fixes #

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:

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

Copilot Summary

🤖 Generated by Copilot at d6c32c4

Summary

🎧🇨🇿🛠️

Add support for mujrozhlas.cz, a Czech radio website, and improve the existing extractor for rozhlas.cz. Refactor rozhlas.py to share common code and logic between the two extractors. Enhance the error handling and audio format extraction for both sites.

To extract from a Czech radio site
We added a class called MujRozhlasIE
And we tweaked rozhlas.py
To handle errors and formats more sly
Now both extractors work well and are tight

Walkthrough

  • Add MujRozhlasIE extractor to handle mujrozhlas.cz URLs (link, link)
  • Refactor _extract_video method of RozhlasVltavaIE to extract audio formats (link)
  • Add missing imports to rozhlas.py (link)

yt_dlp/extractor/rozhlas.py Outdated Show resolved Hide resolved
yt_dlp/extractor/rozhlas.py Outdated Show resolved Hide resolved
@bashonly bashonly added the pending-fixes PR has had changes requested label May 27, 2023
yt_dlp/extractor/rozhlas.py Outdated Show resolved Hide resolved
yt_dlp/extractor/rozhlas.py Outdated Show resolved Hide resolved
yt_dlp/extractor/rozhlas.py Outdated Show resolved Hide resolved
yt_dlp/extractor/rozhlas.py Outdated Show resolved Hide resolved
yt_dlp/extractor/rozhlas.py Outdated Show resolved Hide resolved
yt_dlp/extractor/rozhlas.py Outdated Show resolved Hide resolved
yt_dlp/extractor/rozhlas.py Outdated Show resolved Hide resolved
yt_dlp/extractor/rozhlas.py Outdated Show resolved Hide resolved
yt_dlp/extractor/rozhlas.py Outdated Show resolved Hide resolved
yt_dlp/extractor/rozhlas.py Outdated Show resolved Hide resolved
@bashonly bashonly changed the title Rozhlas [extractor/rozhlas] Add MujRozhlas extractor May 31, 2023
@pukkandan pukkandan added the site-request Request to support a new website label Jun 1, 2023
@bashonly bashonly removed the pending-fixes PR has had changes requested label Jun 2, 2023
@bashonly
Copy link
Member

bashonly commented Jun 2, 2023

@stanoarn Test my changes and let me know what you think

@stanoarn
Copy link
Contributor Author

stanoarn commented Jun 6, 2023

Sorry, I was busy with real life stuff, thank you for doing all the hard work. I've added comments explaining which kind of extraction is being tested, and replaced the test for serials, since the one we had been testing has since been removed. Everything else looks alright.

@stanoarn stanoarn requested a review from bashonly June 6, 2023 10:43
@bashonly bashonly added the pending-review PR needs a review label Jun 6, 2023
@bashonly bashonly removed the pending-review PR needs a review label Jun 6, 2023
@bashonly bashonly merged commit c2b801f into yt-dlp:master Jun 7, 2023
aalsuwaidi pushed a commit to aalsuwaidi/yt-dlp that referenced this pull request Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
site-request Request to support a new website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants