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/imgur] Fix Imgur Extractor #9471

Merged
merged 7 commits into from Mar 17, 2024
Merged

Conversation

trwstin
Copy link
Contributor

@trwstin trwstin commented Mar 16, 2024

Fix Imgur Extractor Downloading Some Videos Incorrectly

This PR adds an 'Accept' header with the value '/' to the request sent to Imgur servers when downloading videos. It is done by modifying ImgurIE to include 'http_headers': {'Accept': '*/*'} under the return statement of _real_extract function.

The change resolves issues with downloading certain video formats from Imgur URLs or those embedded in Reddit posts, ensuring that the download does not result in a corrupted file.

Fixes #9458

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?

Ensure that any media type can be accepted by adding 'http_headers': {'Accept': '*/*'}
deleted trailing whitespace
yt_dlp/extractor/imgur.py Outdated Show resolved Hide resolved
@bashonly bashonly added the site-bug Issue with a specific website label Mar 16, 2024
Added md5 and removed add_ies
turns out i didnt' remove add_ies
yt_dlp/extractor/imgur.py Outdated Show resolved Hide resolved
yt_dlp/extractor/imgur.py Outdated Show resolved Hide resolved
yt_dlp/extractor/imgur.py Outdated Show resolved Hide resolved
trwstin and others added 3 commits March 17, 2024 03:06
corrected duration

Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
@bashonly bashonly merged commit 86d2f4d into yt-dlp:master Mar 17, 2024
6 checks passed
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-bug Issue with a specific website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

getting corrupted videos from IMGUR
2 participants