mirror of
https://github.com/blackjack4494/yt-dlc.git
synced 2024-12-22 07:43:08 +00:00
fix and cheap workaround for unix 404 error.
This commit is contained in:
parent
ea4b8b6747
commit
0bfc3b7e7b
1 changed files with 4 additions and 2 deletions
|
@ -56,14 +56,16 @@ class VikiBaseIE(InfoExtractor):
|
||||||
|
|
||||||
def _call_api(self, path, video_id, note, timestamp=None, post_data=None):
|
def _call_api(self, path, video_id, note, timestamp=None, post_data=None):
|
||||||
resp = self._download_json(
|
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])
|
||||||
|
|
||||||
|
print(resp)
|
||||||
|
|
||||||
error = resp.get('error')
|
error = resp.get('error')
|
||||||
if error:
|
if error:
|
||||||
if error == 'invalid timestamp':
|
if error == 'invalid timestamp':
|
||||||
resp = self._download_json(
|
resp = self._download_json(
|
||||||
self._prepare_call(path, int(resp['current_timestamp']), post_data),
|
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')
|
error = resp.get('error')
|
||||||
if error:
|
if error:
|
||||||
self._raise_error(resp['error'])
|
self._raise_error(resp['error'])
|
||||||
|
|
Loading…
Reference in a new issue