diff options
author | nixxo <nixxo@protonmail.com> | 2021-01-07 16:49:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-07 16:49:07 +0100 |
commit | 1c3a61baae8f9aea1fa5610317e9bfd63a259d2d (patch) | |
tree | 27b312678d5eb1bed87ebb0af9f453fbfa94a424 /youtube_dlc/extractor/viki.py | |
parent | 727006d9515441ae44dd034955fd220d5afed9a6 (diff) | |
parent | 9d88274ca2e5248481204e753b458e3a4eeac60e (diff) | |
download | hypervideo-pre-1c3a61baae8f9aea1fa5610317e9bfd63a259d2d.tar.lz hypervideo-pre-1c3a61baae8f9aea1fa5610317e9bfd63a259d2d.tar.xz hypervideo-pre-1c3a61baae8f9aea1fa5610317e9bfd63a259d2d.zip |
Merge branch 'master' into akamai-fix
Diffstat (limited to 'youtube_dlc/extractor/viki.py')
-rw-r--r-- | youtube_dlc/extractor/viki.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/youtube_dlc/extractor/viki.py b/youtube_dlc/extractor/viki.py index 09da4338d..fd1c305b1 100644 --- a/youtube_dlc/extractor/viki.py +++ b/youtube_dlc/extractor/viki.py @@ -63,14 +63,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, headers={'x-viki-app-ver': '2.2.5.1428709186'}, expected_status=[200, 400, 404]) + self._prepare_call(path, timestamp, post_data), video_id, note) 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, headers={'x-viki-app-ver': '2.2.5.1428709186'}, expected_status=[200, 400, 404]) + video_id, '%s (retry)' % note) error = resp.get('error') if error: self._raise_error(resp['error']) @@ -263,7 +263,7 @@ class VikiIE(VikiBaseIE): # New way to fetch subtitles new_video = self._download_json( 'https://www.viki.com/api/videos/%s' % video_id, video_id, - 'Downloading new video JSON to get subtitles', headers={'x-viki-app-ver': '2.2.5.1428709186'}, expected_status=[200, 400, 404]) + 'Downloading new video JSON to get subtitles', fatal=False) for sub in new_video.get('streamSubtitles').get('dash'): subtitles[sub.get('srclang')] = [{ 'ext': 'vtt', |