diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-04-27 14:32:08 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-04-28 19:18:06 +0530 |
commit | 58f197b76c09672ee8271763c22ac1464b9e5d71 (patch) | |
tree | 84a218c9520e5fdb6572af3a6503d9c794df4493 | |
parent | 895b0931e573fd79d22fdd2e52c3948ee34e2105 (diff) | |
download | hypervideo-pre-58f197b76c09672ee8271763c22ac1464b9e5d71.tar.lz hypervideo-pre-58f197b76c09672ee8271763c22ac1464b9e5d71.tar.xz hypervideo-pre-58f197b76c09672ee8271763c22ac1464b9e5d71.zip |
Revert "[core] be able to hand over id and title using url_result"
This reverts commit 0704d2224b328caeafbce6a029904472628d12bd.
This is a commit from `youtube-dlc`. It is not clear what the original purpose of this was. It seems to be a way for extractors to pass `title` and `id` through when the entry is processed by another extractor
* But `title` can already be passed through using `url_transparent`
* `id` is never supposed to be passed through since it could cause issues with archiving
-rw-r--r-- | yt_dlp/YoutubeDL.py | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index 48799369b..1532171e0 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -1013,7 +1013,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, info_dict=None, extra_info={}, + def extract_info(self, url, download=True, ie_key=None, extra_info={}, process=True, force_generic_extractor=False): ''' Returns a list with a dictionary for each video we find. @@ -1049,7 +1049,7 @@ class YoutubeDL(object): self.to_screen("[%s] %s: has already been recorded in archive" % ( ie_key, temp_id)) break - return self.__extract_info(url, ie, download, extra_info, process, info_dict) + return self.__extract_info(url, ie, download, extra_info, process) else: self.report_error('no suitable InfoExtractor for URL %s' % url) @@ -1076,7 +1076,7 @@ class YoutubeDL(object): return wrapper @__handle_extraction_exceptions - def __extract_info(self, url, ie, download, extra_info, process, info_dict): + def __extract_info(self, url, ie, download, extra_info, process): ie_result = ie.extract(url) if ie_result is None: # Finished already (backwards compatibility; listformats and friends should be moved here) return @@ -1086,11 +1086,6 @@ class YoutubeDL(object): '_type': 'compat_list', 'entries': ie_result, } - if info_dict: - if info_dict.get('id'): - ie_result['id'] = info_dict['id'] - if info_dict.get('title'): - ie_result['title'] = info_dict['title'] self.add_default_extra_info(ie_result, ie, url) if process: return self.process_ie_result(ie_result, download, extra_info) @@ -1130,7 +1125,7 @@ class YoutubeDL(object): # We have to add extra_info to the results because it may be # contained in a playlist return self.extract_info(ie_result['url'], - download, info_dict=ie_result, + download, ie_key=ie_result.get('ie_key'), extra_info=extra_info) elif result_type == 'url_transparent': |