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/youjizz.py | |
parent | 4ecf300d13a6503ae80b76e01047b41d86ab4d92 (diff) |
Improve URL extraction
Diffstat (limited to 'youtube_dl/extractor/youjizz.py')
-rw-r--r-- | youtube_dl/extractor/youjizz.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/youtube_dl/extractor/youjizz.py b/youtube_dl/extractor/youjizz.py index f33fabe19..dff69fcb7 100644 --- a/youtube_dl/extractor/youjizz.py +++ b/youtube_dl/extractor/youjizz.py @@ -3,11 +3,11 @@ from __future__ import unicode_literals import re from .common import InfoExtractor -from ..compat import compat_str from ..utils import ( determine_ext, int_or_none, parse_duration, + url_or_none, ) @@ -50,8 +50,8 @@ class YouJizzIE(InfoExtractor): for encoding in encodings: if not isinstance(encoding, dict): continue - format_url = encoding.get('filename') - if not isinstance(format_url, compat_str): + format_url = url_or_none(encoding.get('filename')) + if not format_url: continue if determine_ext(format_url) == 'm3u8': formats.extend(self._extract_m3u8_formats( |