aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/zattoo.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/zattoo.py
parent4ecf300d13a6503ae80b76e01047b41d86ab4d92 (diff)
Improve URL extraction
Diffstat (limited to 'youtube_dl/extractor/zattoo.py')
-rw-r--r--youtube_dl/extractor/zattoo.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/youtube_dl/extractor/zattoo.py b/youtube_dl/extractor/zattoo.py
index b5a3a0716..fb167c198 100644
--- a/youtube_dl/extractor/zattoo.py
+++ b/youtube_dl/extractor/zattoo.py
@@ -13,6 +13,7 @@ from ..utils import (
ExtractorError,
int_or_none,
try_get,
+ url_or_none,
urlencode_postdata,
)
@@ -150,8 +151,8 @@ class ZattooBaseIE(InfoExtractor):
for watch in watch_urls:
if not isinstance(watch, dict):
continue
- watch_url = watch.get('url')
- if not watch_url or not isinstance(watch_url, compat_str):
+ watch_url = url_or_none(watch.get('url'))
+ if not watch_url:
continue
format_id_list = [stream_type]
maxrate = watch.get('maxrate')