Fix extra_info being reused across runs

Closes #727
This commit is contained in:
pukkandan 2021-08-19 03:10:32 +05:30
parent 9e598870dd
commit 58adec4677
No known key found for this signature in database
GPG key ID: 0F00D95A001F4698

View file

@ -1254,7 +1254,7 @@ def add_default_extra_info(self, ie_result, ie, url):
'extractor_key': ie.ie_key(), 'extractor_key': ie.ie_key(),
}) })
def process_ie_result(self, ie_result, download=True, extra_info={}): def process_ie_result(self, ie_result, download=True, extra_info=None):
""" """
Take the result of the ie(may be modified) and resolve all unresolved Take the result of the ie(may be modified) and resolve all unresolved
references (URLs, playlist items). references (URLs, playlist items).
@ -1262,6 +1262,8 @@ def process_ie_result(self, ie_result, download=True, extra_info={}):
It will also download the videos if 'download'. It will also download the videos if 'download'.
Returns the resolved ie_result. Returns the resolved ie_result.
""" """
if extra_info is None:
extra_info = {}
result_type = ie_result.get('_type', 'video') result_type = ie_result.get('_type', 'video')
if result_type in ('url', 'url_transparent'): if result_type in ('url', 'url_transparent'):