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

[CapitalTVCy] Add Capital TV Cyprus extractor #8948

Merged
merged 18 commits into from Jan 19, 2024

Conversation

pompos02
Copy link
Contributor

@pompos02 pompos02 commented Jan 7, 2024

Description of your pull request and other information

This pull request adds a new extractor for Capital TV Cyprus (CapitalTVCy). The extractor handles the extraction of YouTube video URLs embedded in the web pages of Capital TV Cyprus. This implementation ensures that users can download videos hosted on capitaltv.cy, which are embedded from YouTube.

The extractor parses the webpage to find the YouTube URL in the data-settings attribute of the video element and then delegates the actual video downloading to the YouTube extractor.

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?

@seproDev seproDev added the site-request Request to support a new website label Jan 8, 2024
@seproDev
Copy link
Collaborator

I think this should instead be written as an embed extractor that can detect the elementor video elements on all pages. Take a look at this PR to see how that is done.

There are also other keys besides youtube_url that should be extracted: vimeo_url, dailymotion_url, and videopress_url.

@seproDev seproDev added the pending-fixes PR has had changes requested label Jan 11, 2024
@pompos02
Copy link
Contributor Author

I updated the code and now works as an embed extractor that can detect the elementor video elements on all pages. It can also detect other keys as you mentioned. I also added the possibility to download playlists. In the page I was originally working the embed videos are not an elementor playlist so I couldn't download them. I added a new test that successfully downloads elementor playlist from another page

yt_dlp/extractor/_extractors.py Outdated Show resolved Hide resolved
yt_dlp/extractor/elementorgeneral.py Outdated Show resolved Hide resolved
yt_dlp/extractor/elementorgeneral.py Outdated Show resolved Hide resolved
yt_dlp/extractor/elementorgeneral.py Outdated Show resolved Hide resolved
yt_dlp/extractor/elementorgeneral.py Outdated Show resolved Hide resolved
yt_dlp/extractor/elementorgeneral.py Outdated Show resolved Hide resolved
pompos02 and others added 9 commits January 14, 2024 19:43
Co-authored-by: sepro <4618135+seproDev@users.noreply.github.com>
Co-authored-by: sepro <4618135+seproDev@users.noreply.github.com>
Co-authored-by: sepro <4618135+seproDev@users.noreply.github.com>
Co-authored-by: sepro <4618135+seproDev@users.noreply.github.com>
Co-authored-by: sepro <4618135+seproDev@users.noreply.github.com>
@seproDev seproDev added pending-review PR needs a review and removed pending-fixes PR has had changes requested labels Jan 14, 2024
@pompos02
Copy link
Contributor Author

hey @seproDev. I saw that you've finished reviewing my pull request. Just wanted to check in and see if there's anything else you need from me to get it merged. Let me know if there are any more changes needed!

@seproDev
Copy link
Collaborator

Nothing is needed from you right now. The PR looks good from my side, but to be merged, a maintainer will also need to review it. They may raise additional things, I didn't catch. This will happen as time permits.

yt_dlp/extractor/elementorembed.py Outdated Show resolved Hide resolved
@bashonly bashonly removed the pending-review PR needs a review label Jan 19, 2024
@seproDev seproDev merged commit 6171b05 into yt-dlp:master Jan 19, 2024
6 checks passed
@pompos02 pompos02 deleted the capitalcy branch January 19, 2024 13:20
aalsuwaidi pushed a commit to aalsuwaidi/yt-dlp that referenced this pull request Apr 21, 2024
Authored by: pompos02, seproDev

Co-authored-by: sepro <4618135+seproDev@users.noreply.github.com>
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.

None yet

5 participants