mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-01-10 09:59:53 +00:00
delete single use variable current_product_subtitle_info
This commit is contained in:
parent
e9e2fe84a2
commit
3f7d3d20bd
|
@ -301,11 +301,10 @@ def _real_extract(self, url):
|
||||||
next_js_data, ('pageProps', 'fallback', lambda k, v: v if re.match(r'@"PRODUCT_DETAIL"[^:]+', k) else None),
|
next_js_data, ('pageProps', 'fallback', lambda k, v: v if re.match(r'@"PRODUCT_DETAIL"[^:]+', k) else None),
|
||||||
get_all=False)
|
get_all=False)
|
||||||
current_product_info = traverse_obj(product_detail_json, ('data', 'current_product'))
|
current_product_info = traverse_obj(product_detail_json, ('data', 'current_product'))
|
||||||
current_product_subtitle_info = current_product_info.get('subtitle')
|
|
||||||
|
|
||||||
formats, subtitles = [], {}
|
formats, subtitles = [], {}
|
||||||
|
|
||||||
for subtitle_info in current_product_subtitle_info:
|
for subtitle_info in current_product_info.get('subtitle') or []:
|
||||||
subtitles.setdefault(subtitle_info.get('code'), []).append({
|
subtitles.setdefault(subtitle_info.get('code'), []).append({
|
||||||
'url': subtitle_info.get('url'),
|
'url': subtitle_info.get('url'),
|
||||||
'name': subtitle_info.get('name')
|
'name': subtitle_info.get('name')
|
||||||
|
|
Loading…
Reference in a new issue