1
0
Fork 0
mirror of https://github.com/blackjack4494/yt-dlc.git synced 2024-12-21 23:33:10 +00:00

Merge pull request #1 from blackjack4494/viki-the_second

Viki the second
This commit is contained in:
Tom-Oliver Heidel 2020-08-31 21:56:17 +02:00 committed by GitHub
commit a2f256c9e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -56,14 +56,14 @@ class VikiBaseIE(InfoExtractor):
def _call_api(self, path, video_id, note, timestamp=None, post_data=None):
resp = self._download_json(
self._prepare_call(path, timestamp, post_data), video_id, note)
self._prepare_call(path, timestamp, post_data), video_id, note, headers={'x-viki-app-ver': '2.2.5.1428709186'}, expected_status=[200, 400, 404])
error = resp.get('error')
if error:
if error == 'invalid timestamp':
resp = self._download_json(
self._prepare_call(path, int(resp['current_timestamp']), post_data),
video_id, '%s (retry)' % note)
video_id, '%s (retry)' % note, headers={'x-viki-app-ver': '2.2.5.1428709186'}, expected_status=[200, 400, 404])
error = resp.get('error')
if error:
self._raise_error(resp['error'])