mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-22 02:32:33 +01:00
[ytdl] simplify '_process_entries()'
This commit is contained in:
parent
4a3a255ddc
commit
6f611de889
@ -116,22 +116,18 @@ class YoutubeDLExtractor(Extractor):
|
||||
for entry in entries:
|
||||
if not entry:
|
||||
continue
|
||||
elif entry.get("_type") in ("url", "url_transparent"):
|
||||
|
||||
if entry.get("_type") in ("url", "url_transparent"):
|
||||
try:
|
||||
info_dict = ytdl_instance.extract_info(
|
||||
entry = ytdl_instance.extract_info(
|
||||
entry["url"], False,
|
||||
ie_key=entry.get("ie_key"))
|
||||
except ytdl_module.utils.YoutubeDLError:
|
||||
continue
|
||||
|
||||
if not info_dict:
|
||||
if not entry:
|
||||
continue
|
||||
elif "entries" in info_dict:
|
||||
yield from self._process_entries(
|
||||
ytdl_module, ytdl_instance, info_dict["entries"])
|
||||
else:
|
||||
yield info_dict
|
||||
elif "entries" in entry:
|
||||
|
||||
if "entries" in entry:
|
||||
yield from self._process_entries(
|
||||
ytdl_module, ytdl_instance, entry["entries"])
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user