From 409e18286e5dcd0cba60726f8143847dfed743cf Mon Sep 17 00:00:00 2001 From: pukkandan Date: Fri, 3 Sep 2021 22:48:42 +0530 Subject: [PATCH] Fix `extra_info` being reused across runs 58adec46773ee95be356daf88da7ac8a0ff1e703 was supposed to solve this, but ended up being an incomplete fix Closes #727 --- yt_dlp/YoutubeDL.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index 913512387..cf8304c39 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -1166,7 +1166,7 @@ class YoutubeDL(object): for key, value in extra_info.items(): info_dict.setdefault(key, value) - def extract_info(self, url, download=True, ie_key=None, extra_info={}, + def extract_info(self, url, download=True, ie_key=None, extra_info=None, process=True, force_generic_extractor=False): """ Return a list with a dictionary for each video extracted. @@ -1183,6 +1183,9 @@ class YoutubeDL(object): force_generic_extractor -- force using the generic extractor """ + if extra_info is None: + extra_info = {} + if not ie_key and force_generic_extractor: ie_key = 'Generic'