Improve URL extraction

This commit is contained in:
Sergey M․ 2018-07-21 19:08:28 +07:00
parent 4ecf300d13
commit 3052a30d42
No known key found for this signature in database
GPG key ID: 2C393E0F18A9236D
47 changed files with 166 additions and 139 deletions

View file

@ -32,6 +32,7 @@ from ..utils import (
unified_strdate,
unsmuggle_url,
UnsupportedError,
url_or_none,
xpath_text,
)
from .commonprotocols import RtmpIE
@ -3130,8 +3131,8 @@ class GenericIE(InfoExtractor):
sources = [sources]
formats = []
for source in sources:
src = source.get('src')
if not src or not isinstance(src, compat_str):
src = url_or_none(source.get('src'))
if not src:
continue
src = compat_urlparse.urljoin(url, src)
src_type = source.get('type')