Twitch - remove duplicate graph call

This commit is contained in:
Avi Peretz 2020-06-07 12:47:42 +03:00
parent 5314669e2a
commit f5ac40a0a2

View File

@ -220,6 +220,7 @@ class TwitchItemBaseIE(TwitchBaseIE):
'timestamp': parse_iso8601(info.get('recorded_at')), 'timestamp': parse_iso8601(info.get('recorded_at')),
'view_count': int_or_none(info.get('views')), 'view_count': int_or_none(info.get('views')),
'is_live': is_live, 'is_live': is_live,
'uploader_like_count': info['channel'].get('followers')
} }
def _real_extract(self, url): def _real_extract(self, url):
@ -372,6 +373,7 @@ class TwitchVodIE(TwitchItemBaseIE):
'ext': 'json', 'ext': 'json',
}], }],
} }
"""
channel_id = info['uploader_id'] channel_id = info['uploader_id']
channel = self._call_api( channel = self._call_api(
'kraken/channels/%s' % channel_id, 'kraken/channels/%s' % channel_id,
@ -383,6 +385,7 @@ class TwitchVodIE(TwitchItemBaseIE):
if description is None: if description is None:
description = channel.get('status') description = channel.get('status')
info['description'] = description info['description'] = description
"""
return info return info