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
[ie/zaiko] add thumbnails from event pages #8054
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The second thumbnail (from the event page) may be the same as the existing one, but not always. Our test does not work, though. This commit could not be finished without c-basalt. Co-authored-by: c-basalt <117849907+c-basalt@users.noreply.github.com>
bashonly
requested changes
Sep 9, 2023
bashonly
added
site-enhancement
Feature request for some website
pending-fixes
PR has had changes requested
labels
Sep 9, 2023
"_download_webpage(fatal=False)" could return "False". Co-authored-by: bashonly <bashonly@bashonly.com>
Using "^https://[\w.-]+/\w+/\w+" to test URLs does not hurt too much. The field "thumbnails" is ignored, see "sanitize_got_info_dict()". Co-authored-by: bashonly <bashonly@bashonly.com>
bashonly
approved these changes
Sep 11, 2023
The comment in fee7e25 about "thumbnails" is wrong:
The real reason to add "thumbnail" back is that the field "thumbnail" will be generated from "thumbnails" in "process_video_result()", so the test will fail if no "thumbnail" specified. |
Correct, but no worries about the message, commits will be squashed when merged |
pzhlkj6612
referenced
this pull request
in c-basalt/yt-dlp
Sep 17, 2023
Closes yt-dlp#7196 Authored by: c-basalt
aalsuwaidi
pushed a commit
to aalsuwaidi/yt-dlp
that referenced
this pull request
Apr 21, 2024
Authored by: pzhlkj6612
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
IMPORTANT: PRs without the template will be CLOSED
Description of your pull request and other information
Hi.
This PR improves #7254.
This commit could not be finished without help of @c-basalt.
Different thumbnails?
The newly added thumbnail, which is from the event page, may be the same as the one of "poster_url", but not always. I participated in a live event that has two different thumbnails before. A thumbnail was shown first and contained something like "there's a special guest coming". The second thumbnail, a few days later, replaced the first one and contained that special guest's name and photo. Fans were pleasantly surprised.
The first thumbnail I saw looks like this:
Local test
Unfortunately, the testing URL "ZAIKO STREAMING TEST" does not seem to work anymore, so I've tested the code with my own ticket only. I don't post the url because posting a real URL might give Zaiko a chance to find the user who shared their ticket.
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:
What is the purpose of your pull request?
Copilot Summary
🤖 Generated by Copilot at 7ad8088
Summary
✨🔨🔍
Added support for multiple thumbnails in
zaiko.py
. Extracted thumbnail URLs from different sources and assigned them IDs based on their filenames.Walkthrough
url_basename
function fromutils
module to generate thumbnail IDs from URLs (link)_real_extract
function to collect two possible thumbnail URLs fromplayer_meta
and Open Graph tags (link)thumbnail
field withthumbnails
field ininfo_dict
, usingurl_basename
to create a list of dictionaries withid
andurl
keys for each thumbnail (link)thumbnail
tothumbnails
field, and provide two expected thumbnail URLs (link)