projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4de3cb8
)
[YoutubeDL] Improve _make_archive_id (closes #19149)
author
Sergey M․
<dstftw@gmail.com>
Thu, 7 Feb 2019 18:08:48 +0000
(
01:08
+0700)
committer
Sergey M․
<dstftw@gmail.com>
Thu, 7 Feb 2019 18:08:48 +0000
(
01:08
+0700)
youtube_dl/YoutubeDL.py
patch
|
blob
|
history
diff --git
a/youtube_dl/YoutubeDL.py
b/youtube_dl/YoutubeDL.py
index c168415ce5184e85170244b8cb0c4e3c4503727f..bc9fc270cdb01aa7693caadc1cf1c5f9a9e6d225 100755
(executable)
--- a/
youtube_dl/YoutubeDL.py
+++ b/
youtube_dl/YoutubeDL.py
@@
-82,6
+82,7
@@
from .utils import (
sanitize_url,
sanitized_Request,
std_headers,
sanitize_url,
sanitized_Request,
std_headers,
+ str_or_none,
subtitles_filename,
UnavailableVideoError,
url_basename,
subtitles_filename,
UnavailableVideoError,
url_basename,
@@
-2067,9
+2068,12
@@
class YoutubeDL(object):
# and backwards compatibility with prior versions
extractor = info_dict.get('extractor_key') or info_dict.get('ie_key') # key in a playlist
if extractor is None:
# and backwards compatibility with prior versions
extractor = info_dict.get('extractor_key') or info_dict.get('ie_key') # key in a playlist
if extractor is None:
+ url = str_or_none(info_dict.get('url'))
+ if not url:
+ return
# Try to find matching extractor for the URL and take its ie_key
for ie in self._ies:
# Try to find matching extractor for the URL and take its ie_key
for ie in self._ies:
- if ie.suitable(
info_dict['url']
):
+ if ie.suitable(
url
):
extractor = ie.ie_key()
break
else:
extractor = ie.ie_key()
break
else: