aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/viewster.py
diff options
context:
space:
mode:
authorremitamine <remitamine@gmail.com>2015-07-31 14:41:30 +0100
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2015-08-01 11:06:26 +0200
commit30a453884e6a4d228ced4cdddcfa8e79a768755a (patch)
tree61ce8e025cc00db5c936cbab63ca5eb3b3e89d62 /youtube_dl/extractor/viewster.py
parent3b58d94f71b0e7b3ace6f5965f7335aa95fd0c1e (diff)
[viewster] use head request to extract api token
Closes #6419.
Diffstat (limited to 'youtube_dl/extractor/viewster.py')
-rw-r--r--youtube_dl/extractor/viewster.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/youtube_dl/extractor/viewster.py b/youtube_dl/extractor/viewster.py
index 65324d903..cda02ba24 100644
--- a/youtube_dl/extractor/viewster.py
+++ b/youtube_dl/extractor/viewster.py
@@ -11,6 +11,7 @@ from ..utils import (
determine_ext,
int_or_none,
parse_iso8601,
+ HEADRequest,
)
@@ -73,7 +74,7 @@ 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)