1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-09-03 00:25:08 +00:00

[extractor, cleanup] Reduce direct use of _downloader

This commit is contained in:
pukkandan
2022-06-23 09:44:22 +05:30
parent f67baae17e
commit 9809740ba5
16 changed files with 40 additions and 32 deletions

View File

@ -521,7 +521,7 @@ class IqIE(InfoExtractor):
'''
def _extract_vms_player_js(self, webpage, video_id):
player_js_cache = self._downloader.cache.load('iq', 'player_js')
player_js_cache = self.cache.load('iq', 'player_js')
if player_js_cache:
return player_js_cache
webpack_js_url = self._proto_relative_url(self._search_regex(
@ -534,7 +534,7 @@ class IqIE(InfoExtractor):
f'https://stc.iqiyipic.com/_next/static/chunks/{webpack_map1.get(module_index, module_index)}.{webpack_map2[module_index]}.js',
video_id, note=f'Downloading #{module_index} module JS', errnote='Unable to download module JS', fatal=False) or ''
if 'vms request' in module_js:
self._downloader.cache.store('iq', 'player_js', module_js)
self.cache.store('iq', 'player_js', module_js)
return module_js
raise ExtractorError('Unable to extract player JS')