[gfycat] Fix `uploader`

This commit is contained in:
pukkandan 2021-12-28 02:49:02 +05:30
parent 1e5c83b26b
commit 7537e35b64
No known key found for this signature in database
GPG Key ID: 0F00D95A001F4698
1 changed files with 24 additions and 4 deletions

View File

@ -24,9 +24,10 @@ class GfycatIE(InfoExtractor):
'duration': 10.4, 'duration': 10.4,
'view_count': int, 'view_count': int,
'like_count': int, 'like_count': int,
'dislike_count': int,
'categories': list, 'categories': list,
'age_limit': 0, 'age_limit': 0,
'uploader_id': 'anonymous',
'description': '',
} }
}, { }, {
'url': 'http://gfycat.com/ifr/JauntyTimelyAmazontreeboa', 'url': 'http://gfycat.com/ifr/JauntyTimelyAmazontreeboa',
@ -40,9 +41,27 @@ class GfycatIE(InfoExtractor):
'duration': 3.52, 'duration': 3.52,
'view_count': int, 'view_count': int,
'like_count': int, 'like_count': int,
'dislike_count': int,
'categories': list, 'categories': list,
'age_limit': 0, 'age_limit': 0,
'uploader_id': 'anonymous',
'description': '',
}
}, {
'url': 'https://gfycat.com/alienatedsolidgreathornedowl',
'info_dict': {
'id': 'alienatedsolidgreathornedowl',
'ext': 'mp4',
'upload_date': '20211226',
'uploader_id': 'reactions',
'timestamp': 1640536930,
'like_count': int,
'description': '',
'title': 'Ingrid Michaelson, Zooey Deschanel - Merry Christmas Happy New Year',
'categories': list,
'age_limit': 0,
'duration': 2.9583333333333335,
'uploader': 'Reaction GIFs',
'view_count': int,
} }
}, { }, {
'url': 'https://gfycat.com/ru/RemarkableDrearyAmurstarfish', 'url': 'https://gfycat.com/ru/RemarkableDrearyAmurstarfish',
@ -74,7 +93,7 @@ class GfycatIE(InfoExtractor):
title = gfy.get('title') or gfy['gfyName'] title = gfy.get('title') or gfy['gfyName']
description = gfy.get('description') description = gfy.get('description')
timestamp = int_or_none(gfy.get('createDate')) timestamp = int_or_none(gfy.get('createDate'))
uploader = gfy.get('userName') uploader = gfy.get('userName') or gfy.get('username')
view_count = int_or_none(gfy.get('views')) view_count = int_or_none(gfy.get('views'))
like_count = int_or_none(gfy.get('likes')) like_count = int_or_none(gfy.get('likes'))
dislike_count = int_or_none(gfy.get('dislikes')) dislike_count = int_or_none(gfy.get('dislikes'))
@ -114,7 +133,8 @@ class GfycatIE(InfoExtractor):
'title': title, 'title': title,
'description': description, 'description': description,
'timestamp': timestamp, 'timestamp': timestamp,
'uploader': uploader, 'uploader': gfy.get('userDisplayName') or uploader,
'uploader_id': uploader,
'duration': duration, 'duration': duration,
'view_count': view_count, 'view_count': view_count,
'like_count': like_count, 'like_count': like_count,