Skip to content

Commit

Permalink
Merge pull request #1 from blackjack4494/viki-the_second
Browse files Browse the repository at this point in the history
Viki the second
  • Loading branch information
blackjack4494 authored Aug 31, 2020
2 parents 6b548c1 + e7ff46d commit a2f256c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions youtube_dl/extractor/viki.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ def _prepare_call(self, path, timestamp=None, post_data=None):

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'])
Expand Down

0 comments on commit a2f256c

Please sign in to comment.