X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fviewster.py;h=cda02ba24b7cc01c317bf5d67ced5f231cfd2a80;hb=725d1c58aa25da8640eef8d62b9451cbd6762169;hp=393b63618a9a872e2b5313e33a6c73eff5a5dccb;hpb=799207e838e0404aaa5cb6658e41bef108aced16;p=youtube-dl diff --git a/youtube_dl/extractor/viewster.py b/youtube_dl/extractor/viewster.py index 393b63618..cda02ba24 100644 --- a/youtube_dl/extractor/viewster.py +++ b/youtube_dl/extractor/viewster.py @@ -5,11 +5,13 @@ from .common import InfoExtractor from ..compat import ( compat_urllib_request, compat_urllib_parse, + compat_urllib_parse_unquote, ) from ..utils import ( determine_ext, int_or_none, parse_iso8601, + HEADRequest, ) @@ -72,9 +74,9 @@ class ViewsterIE(InfoExtractor): def _real_extract(self, url): video_id = self._match_id(url) # Get 'api_token' cookie - self._request_webpage(url, video_id) + self._request_webpage(HEADRequest(url), video_id) cookies = self._get_cookies(url) - self._AUTH_TOKEN = compat_urllib_parse.unquote(cookies['api_token'].value) + self._AUTH_TOKEN = compat_urllib_parse_unquote(cookies['api_token'].value) info = self._download_json( 'https://public-api.viewster.com/search/%s' % video_id,