projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improve URL extraction
[youtube-dl]
/
youtube_dl
/
extractor
/
generic.py
diff --git
a/youtube_dl/extractor/generic.py
b/youtube_dl/extractor/generic.py
index aa04905ed802d7ce5ddc783f10cb7bb0ce6f74a5..e5a8ffbe8d14897b410ea2b2078f4073aa5bed42 100644
(file)
--- a/
youtube_dl/extractor/generic.py
+++ b/
youtube_dl/extractor/generic.py
@@
-32,6
+32,7
@@
from ..utils import (
unified_strdate,
unsmuggle_url,
UnsupportedError,
unified_strdate,
unsmuggle_url,
UnsupportedError,
+ url_or_none,
xpath_text,
)
from .commonprotocols import RtmpIE
xpath_text,
)
from .commonprotocols import RtmpIE
@@
-3130,8
+3131,8
@@
class GenericIE(InfoExtractor):
sources = [sources]
formats = []
for source in sources:
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')
continue
src = compat_urlparse.urljoin(url, src)
src_type = source.get('type')