aboutsummaryrefslogtreecommitdiffstats
path: root/youtube_dl/extractor/curiositystream.py
diff options
context:
space:
mode:
authorRemita Amine <remitamine@gmail.com>2016-09-01 19:46:58 +0100
committerRemita Amine <remitamine@gmail.com>2016-09-01 19:46:58 +0100
commitb207d5ebd4eab80e07673aba9696d240d1009bcf (patch)
tree26774f16179e70fca9d6c0a22ffdfa3b17110ea7 /youtube_dl/extractor/curiositystream.py
parent4191779dcda8a80faf6e53579e011b63ee5c3878 (diff)
downloadyoutube-dl-b207d5ebd4eab80e07673aba9696d240d1009bcf.zip
youtube-dl-b207d5ebd4eab80e07673aba9696d240d1009bcf.tar.gz
youtube-dl-b207d5ebd4eab80e07673aba9696d240d1009bcf.tar.bz2
[curiositystream] don't cache auth token
Diffstat (limited to 'youtube_dl/extractor/curiositystream.py')
-rw-r--r--youtube_dl/extractor/curiositystream.py28
1 files changed, 10 insertions, 18 deletions
diff --git a/youtube_dl/extractor/curiositystream.py b/youtube_dl/extractor/curiositystream.py
index 7105e3c..e3c9946 100644
--- a/youtube_dl/extractor/curiositystream.py
+++ b/youtube_dl/extractor/curiositystream.py
@@ -33,24 +33,16 @@ class CuriosityStreamBaseIE(InfoExtractor):
return result['data']
def _real_initialize(self):
- if not self._auth_token:
- user = self._downloader.cache.load('curiositystream', 'user') or {}
- self._auth_token = user.get('auth_token')
- if not self._auth_token:
- (email, password) = self._get_login_info()
- if email is None:
- return
- result = self._download_json(
- self._API_BASE_URL + 'login', None, data=urlencode_postdata({
- 'email': email,
- 'password': password,
- }))
- self._handle_errors(result)
- self._auth_token = result['message']['auth_token']
- self._downloader.cache.store(
- 'curiositystream', 'user', {
- 'auth_token': self._auth_token,
- })
+ (email, password) = self._get_login_info()
+ if email is None:
+ return
+ result = self._download_json(
+ self._API_BASE_URL + 'login', None, data=urlencode_postdata({
+ 'email': email,
+ 'password': password,
+ }))
+ self._handle_errors(result)
+ self._auth_token = result['message']['auth_token']
def _extract_media_info(self, media):
video_id = compat_str(media['id'])