aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/eporner.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2018-07-21 19:08:28 +0700
committerSergey M․ <dstftw@gmail.com>2018-07-21 19:08:28 +0700
commit3052a30d4259b182904e5d2430077039461745bb (patch)
tree90ff37fa326c33aff3ad82cd40a2f3ce856ee65b /youtube_dl/extractor/eporner.py
parent4ecf300d13a6503ae80b76e01047b41d86ab4d92 (diff)
Improve URL extraction
Diffstat (limited to 'youtube_dl/extractor/eporner.py')
-rw-r--r--youtube_dl/extractor/eporner.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/youtube_dl/extractor/eporner.py b/youtube_dl/extractor/eporner.py
index 81f2e2ee1..6d03d7095 100644
--- a/youtube_dl/extractor/eporner.py
+++ b/youtube_dl/extractor/eporner.py
@@ -11,6 +11,7 @@ from ..utils import (
int_or_none,
parse_duration,
str_to_int,
+ url_or_none,
)
@@ -82,8 +83,8 @@ class EpornerIE(InfoExtractor):
for format_id, format_dict in formats_dict.items():
if not isinstance(format_dict, dict):
continue
- src = format_dict.get('src')
- if not isinstance(src, compat_str) or not src.startswith('http'):
+ src = url_or_none(format_dict.get('src'))
+ if not src or not src.startswith('http'):
continue
if kind == 'hls':
formats.extend(self._extract_m3u8_formats(