mirror of
https://github.com/yt-dlp/yt-dlp
synced 2024-12-26 21:59:08 +01:00
Use set
This commit is contained in:
parent
f09bf69251
commit
4bce9e61ba
1 changed files with 3 additions and 6 deletions
|
@ -59,9 +59,7 @@ class WDRIE(InfoExtractor):
|
||||||
|
|
||||||
formats = []
|
formats = []
|
||||||
subtitles = {}
|
subtitles = {}
|
||||||
|
seen_manifest_urls = set()
|
||||||
# list to track the urls and ensure that not a second manifest url with the same value is added
|
|
||||||
avoid_duplicate_manifest_urls = []
|
|
||||||
|
|
||||||
# check if the metadata contains a direct URL to a file
|
# check if the metadata contains a direct URL to a file
|
||||||
for kind, media in media_resource.items():
|
for kind, media in media_resource.items():
|
||||||
|
@ -82,10 +80,9 @@ class WDRIE(InfoExtractor):
|
||||||
if tag_name not in ('videoURL', 'audioURL'):
|
if tag_name not in ('videoURL', 'audioURL'):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if medium_url not in avoid_duplicate_manifest_urls:
|
if medium_url in seen_manifest_urls:
|
||||||
avoid_duplicate_manifest_urls.append(medium_url)
|
|
||||||
else:
|
|
||||||
continue
|
continue
|
||||||
|
seen_manifest_urls.add(medium_url)
|
||||||
|
|
||||||
ext = determine_ext(medium_url)
|
ext = determine_ext(medium_url)
|
||||||
if ext == 'm3u8':
|
if ext == 'm3u8':
|
||||||
|
|
Loading…
Reference in a new issue