diff options
author | pukkandan <pukkandan@gmail.com> | 2021-01-21 17:36:42 +0530 |
---|---|---|
committer | pukkandan <pukkandan@gmail.com> | 2021-01-21 17:36:42 +0530 |
commit | d0757229fae24bd83fc19a751660e9acdbc3b7c0 (patch) | |
tree | eaae2735c462561701d8e6606efd4503595bc000 /youtube_dlc/YoutubeDL.py | |
parent | 610d8e7692fd9855b0de913edb3e52877aa46b31 (diff) | |
download | hypervideo-pre-d0757229fae24bd83fc19a751660e9acdbc3b7c0.tar.lz hypervideo-pre-d0757229fae24bd83fc19a751660e9acdbc3b7c0.tar.xz hypervideo-pre-d0757229fae24bd83fc19a751660e9acdbc3b7c0.zip |
Fix typecasting when pre-checking archive (Closes #26)
Diffstat (limited to 'youtube_dlc/YoutubeDL.py')
-rw-r--r-- | youtube_dlc/YoutubeDL.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/youtube_dlc/YoutubeDL.py b/youtube_dlc/YoutubeDL.py index fc39cbbc9..867f3a61a 100644 --- a/youtube_dlc/YoutubeDL.py +++ b/youtube_dlc/YoutubeDL.py @@ -885,7 +885,9 @@ class YoutubeDL(object): 'and will probably not work.') try: - temp_id = ie.extract_id(url) if callable(getattr(ie, 'extract_id', None)) else ie._match_id(url) + temp_id = str_or_none( + ie.extract_id(url) if callable(getattr(ie, 'extract_id', None)) + else ie._match_id(url)) except (AssertionError, IndexError, AttributeError): temp_id = None if temp_id is not None and self.in_download_archive({'id': temp_id, 'ie_key': ie_key}): @@ -2364,7 +2366,7 @@ class YoutubeDL(object): break else: return - return extractor.lower() + ' ' + video_id + return '%s %s' % (extractor.lower(), video_id) def in_download_archive(self, info_dict): fn = self.params.get('download_archive') |