1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-03-10 05:57:16 +08:00

Added broadcaster id retrieval for twitch clip (#313)

This commit is contained in:
vshiran 2020-05-14 23:17:54 -07:00 committed by GitHub
parent bc8cc9602e
commit 3d42ba1a26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -705,6 +705,7 @@ class TwitchClipsIE(TwitchBaseIE):
clip(slug: "%s") {
broadcaster {
displayName
id
}
createdAt
curator {
@ -774,6 +775,7 @@ class TwitchClipsIE(TwitchBaseIE):
'timestamp': unified_timestamp(clip.get('createdAt')),
'thumbnails': thumbnails,
'creator': try_get(clip, lambda x: x['broadcaster']['displayName'], compat_str),
'creator_id': try_get(clip, lambda x: x['broadcaster']['id'], compat_str),
'uploader': try_get(clip, lambda x: x['curator']['displayName'], compat_str),
'uploader_id': try_get(clip, lambda x: x['curator']['id'], compat_str),
}