0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-23 02:25:11 +00:00

[vvvvid] do not cache the conn_id

This commit is contained in:
Remita Amine 2016-12-16 11:04:58 +01:00
parent 7b1e80792b
commit dc1f3a9f20

View file

@ -35,17 +35,9 @@ class VVVVIDIE(InfoExtractor):
_conn_id = None _conn_id = None
def _real_initialize(self): def _real_initialize(self):
if not self._conn_id: self._conn_id = self._download_json(
user = self._downloader.cache.load('vvvvid', 'user') or {} 'https://www.vvvvid.it/user/login',
self._conn_id = user.get('conn_id') None, headers=self.geo_verification_headers())['data']['conn_id']
if not self._conn_id:
self._conn_id = self._download_json(
'https://www.vvvvid.it/user/login',
None, headers=self.geo_verification_headers())['data']['conn_id']
self._downloader.cache.store(
'vvvvid', 'user', {
'conn_id': self._conn_id,
})
def _real_extract(self, url): def _real_extract(self, url):
show_id, season_id, video_id = re.match(self._VALID_URL, url).groups() show_id, season_id, video_id = re.match(self._VALID_URL, url).groups()