summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRemita Amine <[email protected]>2021-02-24 22:29:35 +0100
committerRemita Amine <[email protected]>2021-02-24 22:29:35 +0100
commitef28e33249f650b3f8d40c3e62b9df2c6103b360 (patch)
tree7d93a8d08cc1cd9eef61bba63ded9be7bf699fdf
parent9662e4964b8d1b8d23c79f90d91b9be87d10029f (diff)
downloadyoutube-dl-ef28e33249f650b3f8d40c3e62b9df2c6103b360.tar.gz
youtube-dl-ef28e33249f650b3f8d40c3e62b9df2c6103b360.zip
[vvvvid] reduce season request payload size
-rw-r--r--youtube_dl/extractor/vvvvid.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/youtube_dl/extractor/vvvvid.py b/youtube_dl/extractor/vvvvid.py
index d62404cf3..7c94c4ee2 100644
--- a/youtube_dl/extractor/vvvvid.py
+++ b/youtube_dl/extractor/vvvvid.py
@@ -75,12 +75,15 @@ class VVVVIDIE(InfoExtractor):
'https://www.vvvvid.it/user/login',
None, headers=self.geo_verification_headers())['data']['conn_id']
- def _download_info(self, show_id, path, video_id, fatal=True):
+ def _download_info(self, show_id, path, video_id, fatal=True, query=None):
+ q = {
+ 'conn_id': self._conn_id,
+ }
+ if query:
+ q.update(query)
response = self._download_json(
'https://www.vvvvid.it/vvvvid/ondemand/%s/%s' % (show_id, path),
- video_id, headers=self.geo_verification_headers(), query={
- 'conn_id': self._conn_id,
- }, fatal=fatal)
+ video_id, headers=self.geo_verification_headers(), query=q, fatal=fatal)
if not (response or fatal):
return
if response.get('result') == 'error':
@@ -98,7 +101,8 @@ class VVVVIDIE(InfoExtractor):
show_id, season_id, video_id = re.match(self._VALID_URL, url).groups()
response = self._download_info(
- show_id, 'season/%s' % season_id, video_id)
+ show_id, 'season/%s' % season_id,
+ video_id, query={'video_id': video_id})
vid = int(video_id)
video_data = list(filter(