Sergey M․
5 years ago
No known key found for this signature in database
GPG Key ID: 2C393E0F18A9236D
1 changed files with
5 additions and
1 deletions
-
youtube_dl/YoutubeDL.py
|
@ -82,6 +82,7 @@ from .utils import ( |
|
|
sanitize_url, |
|
|
sanitize_url, |
|
|
sanitized_Request, |
|
|
sanitized_Request, |
|
|
std_headers, |
|
|
std_headers, |
|
|
|
|
|
str_or_none, |
|
|
subtitles_filename, |
|
|
subtitles_filename, |
|
|
UnavailableVideoError, |
|
|
UnavailableVideoError, |
|
|
url_basename, |
|
|
url_basename, |
|
@ -2067,9 +2068,12 @@ class YoutubeDL(object): |
|
|
# and backwards compatibility with prior versions |
|
|
# and backwards compatibility with prior versions |
|
|
extractor = info_dict.get('extractor_key') or info_dict.get('ie_key') # key in a playlist |
|
|
extractor = info_dict.get('extractor_key') or info_dict.get('ie_key') # key in a playlist |
|
|
if extractor is None: |
|
|
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 |
|
|
# Try to find matching extractor for the URL and take its ie_key |
|
|
for ie in self._ies: |
|
|
for ie in self._ies: |
|
|
if ie.suitable(info_dict['url']): |
|
|
|
|
|
|
|
|
if ie.suitable(url): |
|
|
extractor = ie.ie_key() |
|
|
extractor = ie.ie_key() |
|
|
break |
|
|
break |
|
|
else: |
|
|
else: |
|
|