Skip to content

Commit ef28e33

Browse files
committed
[vvvvid] reduce season request payload size
1 parent 9662e49 commit ef28e33

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

youtube_dl/extractor/vvvvid.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,15 @@ def _real_initialize(self):
7575
'https://www.vvvvid.it/user/login',
7676
None, headers=self.geo_verification_headers())['data']['conn_id']
7777

78-
def _download_info(self, show_id, path, video_id, fatal=True):
78+
def _download_info(self, show_id, path, video_id, fatal=True, query=None):
79+
q = {
80+
'conn_id': self._conn_id,
81+
}
82+
if query:
83+
q.update(query)
7984
response = self._download_json(
8085
'https://www.vvvvid.it/vvvvid/ondemand/%s/%s' % (show_id, path),
81-
video_id, headers=self.geo_verification_headers(), query={
82-
'conn_id': self._conn_id,
83-
}, fatal=fatal)
86+
video_id, headers=self.geo_verification_headers(), query=q, fatal=fatal)
8487
if not (response or fatal):
8588
return
8689
if response.get('result') == 'error':
@@ -98,7 +101,8 @@ def _real_extract(self, url):
98101
show_id, season_id, video_id = re.match(self._VALID_URL, url).groups()
99102

100103
response = self._download_info(
101-
show_id, 'season/%s' % season_id, video_id)
104+
show_id, 'season/%s' % season_id,
105+
video_id, query={'video_id': video_id})
102106

103107
vid = int(video_id)
104108
video_data = list(filter(

0 commit comments

Comments
 (0)