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

[Prankcast] Fix extractor and add live chat #8933

Merged
merged 7 commits into from Jan 31, 2024

Conversation

columndeeply
Copy link
Contributor

@columndeeply columndeeply commented Jan 4, 2024

IMPORTANT: PRs without the template will be CLOSED

Description of your pull request and other information

This PR fixes the old extractor and adds support for live chat downloading.

I'm not sure if I'm doing it correctly but it's saving the subtitles file as ".live_chat.unknown_video"... Not sure what that means... The contents of the chat JSON are saved correctly so that part seems to work.

I also wanted to add livestream support but couldn't figure out how to. If anybody could point me to an existing extractor that supports both livestreams and non-live media (and is simpler than the YouTube one... I was following that but no luck...) I'd appreciate it. If I end up figuring it out I'll make a new PR with that feature.

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?

@seproDev seproDev added site-enhancement Feature request for some website site-bug Issue with a specific website labels Jan 4, 2024
@seproDev
Copy link
Collaborator

You should not break the old URLs, which still work.

You can specify the ext for the live chat to be saved as json.

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

Added the ext, it's saving them as "live_chat.json" now.

The /showreel/ URLs have been deprecated for a while. They are no longer accessible directly from the site, all links now point to the /posts/ path. It's missing a few of the fields I'm using on the new extractor as well.

I can try to add support for /showreel/ back but I'm not sure whats the point of keeping them around...

@seproDev
Copy link
Collaborator

Since there are also ID collisions (Old 6217, New 6217) I'd say it would probably best if you just create a new extractor. PrankCastIE stays the old extractor for showreel links and PrankCastPostIE can be your current code to deal with the new posts links.

@columndeeply
Copy link
Contributor Author

Done, I've added the PrankCastPostIE for the new URLs

@pukkandan pukkandan removed the pending-fixes PR has had changes requested label Jan 19, 2024
yt_dlp/extractor/prankcastpost.py Outdated Show resolved Hide resolved
yt_dlp/extractor/prankcastpost.py Outdated Show resolved Hide resolved
yt_dlp/extractor/prankcastpost.py Outdated Show resolved Hide resolved
yt_dlp/extractor/_extractors.py Outdated Show resolved Hide resolved
@pukkandan pukkandan removed the site-bug Issue with a specific website label Jan 19, 2024
yt_dlp/extractor/prankcast.py Outdated Show resolved Hide resolved
yt_dlp/extractor/prankcast.py Outdated Show resolved Hide resolved
yt_dlp/extractor/prankcast.py Outdated Show resolved Hide resolved
yt_dlp/extractor/prankcast.py Outdated Show resolved Hide resolved
yt_dlp/extractor/prankcast.py Outdated Show resolved Hide resolved
yt_dlp/extractor/prankcast.py Outdated Show resolved Hide resolved
yt_dlp/extractor/prankcast.py Outdated Show resolved Hide resolved
yt_dlp/extractor/prankcast.py Outdated Show resolved Hide resolved
yt_dlp/extractor/prankcast.py Outdated Show resolved Hide resolved
@bashonly bashonly added the pending-fixes PR has had changes requested label Jan 30, 2024
@bashonly
Copy link
Member

bashonly commented Jan 30, 2024

If anybody could point me to an existing extractor that supports both livestreams and non-live media

EttuTvIE is a very simple example of 1 extractor supporting both. Read about the is_live and live_status info dict fields in the InfoExtractor docstring. However, if the livestreams have a different URL format than non-live posts, it could be better for them to be handled in their own extractor. The Kick extractors are good simple examples of separate VOD vs live extractors

@columndeeply
Copy link
Contributor Author

EttuTvIE is a very simple example of 1 extractor supporting both. Read about the is_live and live_status info dict fields in the InfoExtractor docstring. However, if the livestreams have a different URL format than non-live posts, it could be better for them to be handled in their own extractor. The Kick extractors are good simple examples of separate VOD vs live extractors

Thanks! I'll check those out and see if I end up figuring it out. I'll probably push that feature as a new PR tho, I won't be able to work on the live extractor for a while.

yt_dlp/extractor/prankcast.py Show resolved Hide resolved
yt_dlp/extractor/prankcast.py Outdated Show resolved Hide resolved
@bashonly bashonly removed the pending-fixes PR has had changes requested label Jan 31, 2024
@bashonly bashonly self-assigned this Jan 31, 2024
@bashonly bashonly merged commit a2bac6b into yt-dlp:master Jan 31, 2024
6 checks passed
FletcherD pushed a commit to FletcherD/yt-dlp that referenced this pull request Feb 14, 2024
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-enhancement Feature request for some website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants