mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-23 19:33:59 +01:00
[extractor/SovietsCloset] Fix extractor (#4688)
Closes #4200 Authored by: ChillingPepper
This commit is contained in:
parent
f6ca640b12
commit
2f1a299c50
|
@ -44,7 +44,7 @@ class SovietsClosetIE(SovietsClosetBaseIE):
|
||||||
_TESTS = [
|
_TESTS = [
|
||||||
{
|
{
|
||||||
'url': 'https://sovietscloset.com/video/1337',
|
'url': 'https://sovietscloset.com/video/1337',
|
||||||
'md5': '11e58781c4ca5b283307aa54db5b3f93',
|
'md5': 'bd012b04b261725510ca5383074cdd55',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '1337',
|
'id': '1337',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
|
@ -69,11 +69,11 @@ class SovietsClosetIE(SovietsClosetBaseIE):
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'url': 'https://sovietscloset.com/video/1105',
|
'url': 'https://sovietscloset.com/video/1105',
|
||||||
'md5': '578b1958a379e7110ba38697042e9efb',
|
'md5': '89fa928f183893cb65a0b7be846d8a90',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '1105',
|
'id': '1105',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'title': 'Arma 3 - Zeus Games #3',
|
'title': 'Arma 3 - Zeus Games #5',
|
||||||
'uploader': 'SovietWomble',
|
'uploader': 'SovietWomble',
|
||||||
'thumbnail': r're:^https?://.*\.b-cdn\.net/c0e5e76f-3a93-40b4-bf01-12343c2eec5d/thumbnail\.jpg$',
|
'thumbnail': r're:^https?://.*\.b-cdn\.net/c0e5e76f-3a93-40b4-bf01-12343c2eec5d/thumbnail\.jpg$',
|
||||||
'uploader': 'SovietWomble',
|
'uploader': 'SovietWomble',
|
||||||
|
@ -89,8 +89,8 @@ class SovietsClosetIE(SovietsClosetBaseIE):
|
||||||
'availability': 'public',
|
'availability': 'public',
|
||||||
'series': 'Arma 3',
|
'series': 'Arma 3',
|
||||||
'season': 'Zeus Games',
|
'season': 'Zeus Games',
|
||||||
'episode_number': 3,
|
'episode_number': 5,
|
||||||
'episode': 'Episode 3',
|
'episode': 'Episode 5',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
@ -122,7 +122,7 @@ def _real_extract(self, url):
|
||||||
video_id = self._match_id(url)
|
video_id = self._match_id(url)
|
||||||
webpage = self._download_webpage(url, video_id)
|
webpage = self._download_webpage(url, video_id)
|
||||||
|
|
||||||
static_assets_base = self._search_regex(r'staticAssetsBase:\"(.*?)\"', webpage, 'staticAssetsBase')
|
static_assets_base = self._search_regex(r'(/_nuxt/static/\d+)', webpage, 'staticAssetsBase')
|
||||||
static_assets_base = f'https://sovietscloset.com{static_assets_base}'
|
static_assets_base = f'https://sovietscloset.com{static_assets_base}'
|
||||||
|
|
||||||
stream = self.parse_nuxt_jsonp(f'{static_assets_base}/video/{video_id}/payload.js', video_id, 'video')['stream']
|
stream = self.parse_nuxt_jsonp(f'{static_assets_base}/video/{video_id}/payload.js', video_id, 'video')['stream']
|
||||||
|
@ -181,7 +181,7 @@ def _real_extract(self, url):
|
||||||
|
|
||||||
webpage = self._download_webpage(url, playlist_id)
|
webpage = self._download_webpage(url, playlist_id)
|
||||||
|
|
||||||
static_assets_base = self._search_regex(r'staticAssetsBase:\"(.*?)\"', webpage, 'staticAssetsBase')
|
static_assets_base = self._search_regex(r'(/_nuxt/static/\d+)', webpage, 'staticAssetsBase')
|
||||||
static_assets_base = f'https://sovietscloset.com{static_assets_base}'
|
static_assets_base = f'https://sovietscloset.com{static_assets_base}'
|
||||||
|
|
||||||
sovietscloset = self.parse_nuxt_jsonp(f'{static_assets_base}/payload.js', playlist_id, 'global')['games']
|
sovietscloset = self.parse_nuxt_jsonp(f'{static_assets_base}/payload.js', playlist_id, 'global')['games']
|
||||||
|
|
Loading…
Reference in New Issue
Block a user