Skip to content

Commit

Permalink
[viki] fix video API request(closes #27184)
Browse files Browse the repository at this point in the history
  • Loading branch information
remitamine committed Nov 24, 2020
1 parent a7ea885 commit 97c5be3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions youtube_dl/extractor/viki.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
parse_age_limit,
parse_iso8601,
sanitized_Request,
std_headers,
)


Expand Down Expand Up @@ -226,8 +227,10 @@ def _real_extract(self, url):

resp = self._download_json(
'https://www.viki.com/api/videos/' + video_id,
video_id, 'Downloading video JSON',
headers={'x-viki-app-ver': '4.0.57'})
video_id, 'Downloading video JSON', headers={
'x-client-user-agent': std_headers['User-Agent'],
'x-viki-app-ver': '4.0.57',
})
video = resp['video']

self._check_errors(video)
Expand Down

0 comments on commit 97c5be3

Please sign in to comment.