diff options
author | Sergey M․ <dstftw@gmail.com> | 2018-07-21 19:08:28 +0700 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2018-07-21 19:08:28 +0700 |
commit | 3052a30d4259b182904e5d2430077039461745bb (patch) | |
tree | 90ff37fa326c33aff3ad82cd40a2f3ce856ee65b /youtube_dl/extractor/keezmovies.py | |
parent | 4ecf300d13a6503ae80b76e01047b41d86ab4d92 (diff) |
Improve URL extraction
Diffstat (limited to 'youtube_dl/extractor/keezmovies.py')
-rw-r--r-- | youtube_dl/extractor/keezmovies.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/youtube_dl/extractor/keezmovies.py b/youtube_dl/extractor/keezmovies.py index d4e6f7ac1..c3eb74c17 100644 --- a/youtube_dl/extractor/keezmovies.py +++ b/youtube_dl/extractor/keezmovies.py @@ -4,16 +4,14 @@ import re from .common import InfoExtractor from ..aes import aes_decrypt_text -from ..compat import ( - compat_str, - compat_urllib_parse_unquote, -) +from ..compat import compat_urllib_parse_unquote from ..utils import ( determine_ext, ExtractorError, int_or_none, str_to_int, strip_or_none, + url_or_none, ) @@ -55,7 +53,8 @@ class KeezMoviesIE(InfoExtractor): encrypted = False def extract_format(format_url, height=None): - if not isinstance(format_url, compat_str) or not format_url.startswith(('http', '//')): + format_url = url_or_none(format_url) + if not format_url or not format_url.startswith(('http', '//')): return if format_url in format_urls: return |