Fix Kakao Extractor

Kakao has changed their API to return `null` for `clipChapterThumbnailList`, this change comments out the thumbnail extractor to fix the issue.
This commit is contained in:
wagwan piffting 2020-09-13 00:21:54 -05:00 committed by GitHub
parent 1f7675451c
commit 836f804256
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 14 deletions

View File

@ -116,19 +116,19 @@ class KakaoIE(InfoExtractor):
pass
self._sort_formats(formats)
thumbs = []
for thumb in clip.get('clipChapterThumbnailList', []):
thumbs.append({
'url': thumb.get('thumbnailUrl'),
'id': compat_str(thumb.get('timeInSec')),
'preference': -1 if thumb.get('isDefault') else 0
})
top_thumbnail = clip.get('thumbnailUrl')
if top_thumbnail:
thumbs.append({
'url': top_thumbnail,
'preference': 10,
})
# thumbs = []
# for thumb in clip.get('clipChapterThumbnailList', []):
# thumbs.append({
# 'url': thumb.get('thumbnailUrl'),
# 'id': compat_str(thumb.get('timeInSec')),
# 'preference': -1 if thumb.get('isDefault') else 0
# })
# top_thumbnail = clip.get('thumbnailUrl')
# if top_thumbnail:
# thumbs.append({
# 'url': top_thumbnail,
# 'preference': 10,
# })
return {
'id': display_id,
@ -136,7 +136,7 @@ class KakaoIE(InfoExtractor):
'description': strip_or_none(clip.get('description')),
'uploader': clip_link.get('channel', {}).get('name'),
'uploader_id': clip_link.get('channelId'),
'thumbnails': thumbs,
# 'thumbnails': thumbs,
'timestamp': unified_timestamp(clip_link.get('createTime')),
'duration': int_or_none(clip.get('duration')),
'view_count': int_or_none(clip.get('playCount')),