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

[ie/facebook] preserve thumbnail provided in video info #9060

Merged
merged 5 commits into from
Jan 28, 2024

Conversation

kclauhk
Copy link
Contributor

@kclauhk kclauhk commented Jan 24, 2024

IMPORTANT: PRs without the template will be CLOSED

Description of your pull request and other information

Changes to preserve preferred_thumbnail url obtained from video info
because video_info['thumbnail'] is lost during merge_dicts

example: https://www.facebook.com/events/1509582499515440
Two different thumbnails are provided:
1st one: from "og:image" meta tag
2nd one: preferred_thumbnail in ScheduledServerJS json

They will be put into webpage_info['thumbnail'] and video_info['thumbnail'] respectively.
Due to the use of merge_dicts, "merge_dicts(webpage_info, video_info)", webpage_info['thumbnail'] will be put into the merged dict but video_info['thumbnail'] will be ignored. The changes is made in order to keep both.

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?

@kclauhk kclauhk changed the title [ie/facebook] preserve preferred thumbnail from video info [ie/facebook] preserve preferred thumbnail in video info Jan 24, 2024
@bashonly bashonly added the site-enhancement Feature request for some website label Jan 26, 2024
yt_dlp/extractor/facebook.py Show resolved Hide resolved
yt_dlp/extractor/facebook.py Outdated Show resolved Hide resolved
yt_dlp/extractor/facebook.py Outdated Show resolved Hide resolved
@bashonly bashonly added the pending-fixes PR has had changes requested label Jan 28, 2024
@kclauhk kclauhk changed the title [ie/facebook] preserve preferred thumbnail in video info [ie/facebook] preserve thumbnail provided in video info Jan 28, 2024
@bashonly bashonly removed the pending-fixes PR has had changes requested label Jan 28, 2024
@bashonly bashonly self-assigned this Jan 28, 2024
@bashonly bashonly merged commit 3c4d3ee into yt-dlp:master Jan 28, 2024
6 checks passed
@kclauhk kclauhk deleted the facebook/thumbnail branch January 29, 2024 15:37
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.

2 participants