mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-03-09 12:50:23 -05:00
Merge c1712d9c0a
into 05c8023a27
This commit is contained in:
commit
5f3af03967
1 changed files with 17 additions and 0 deletions
|
@ -432,6 +432,23 @@ def add_thumbnail(src):
|
|||
'display_id': video_id,
|
||||
}
|
||||
|
||||
# Hosted on reddit as an image (most likely gif)
|
||||
if parsed_url.netloc == 'i.redd.it':
|
||||
formats = [{
|
||||
'url': video_url,
|
||||
'acodec': 'none',
|
||||
'ext': video_url.rsplit('.', 1)[-1],
|
||||
'format_id': video_url.rsplit('.', 1)[-1],
|
||||
# Must GET only accepting raw file content
|
||||
'http_headers': {'Accept': 'video/*,image/*'},
|
||||
}]
|
||||
return {
|
||||
**info,
|
||||
'id': parsed_url.path.split('/')[1],
|
||||
'display_id': video_id,
|
||||
'formats': formats,
|
||||
}
|
||||
|
||||
# Not hosted on reddit, must continue extraction
|
||||
return {
|
||||
**info,
|
||||
|
|
Loading…
Reference in a new issue