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/vk.py | |
parent | 4ecf300d13a6503ae80b76e01047b41d86ab4d92 (diff) |
Improve URL extraction
Diffstat (limited to 'youtube_dl/extractor/vk.py')
-rw-r--r-- | youtube_dl/extractor/vk.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/youtube_dl/extractor/vk.py b/youtube_dl/extractor/vk.py index 29002b35f..48b5987c2 100644 --- a/youtube_dl/extractor/vk.py +++ b/youtube_dl/extractor/vk.py @@ -20,6 +20,7 @@ from ..utils import ( str_to_int, unescapeHTML, unified_timestamp, + url_or_none, urlencode_postdata, ) from .dailymotion import DailymotionIE @@ -423,7 +424,8 @@ class VKIE(VKBaseIE): formats = [] for format_id, format_url in data.items(): - if not isinstance(format_url, compat_str) or not format_url.startswith(('http', '//', 'rtmp')): + format_url = url_or_none(format_url) + if not format_url or not format_url.startswith(('http', '//', 'rtmp')): continue if (format_id.startswith(('url', 'cache')) or format_id in ('extra_data', 'live_mp4', 'postlive_mp4')): |