projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
38f59e2
)
[extractor/common] Improve thumbnail extraction for HTML5 entries
author
Sergey M․
<dstftw@gmail.com>
Mon, 19 Mar 2018 16:43:53 +0000
(23:43 +0700)
committer
Sergey M․
<dstftw@gmail.com>
Mon, 19 Mar 2018 16:43:53 +0000
(23:43 +0700)
youtube_dl/extractor/common.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/common.py
b/youtube_dl/extractor/common.py
index 2e2a02948d1ad66753cb23729ce7fcf74d983556..890232586333866b64f1b3d2bdba6231535854e9 100644
(file)
--- a/
youtube_dl/extractor/common.py
+++ b/
youtube_dl/extractor/common.py
@@
-2150,8
+2150,8
@@
class InfoExtractor(object):
return formats
def _parse_html5_media_entries(self, base_url, webpage, video_id, m3u8_id=None, m3u8_entry_protocol='m3u8', mpd_id=None, preference=None):
return formats
def _parse_html5_media_entries(self, base_url, webpage, video_id, m3u8_id=None, m3u8_entry_protocol='m3u8', mpd_id=None, preference=None):
- def absolute_url(
video
_url):
- return
compat_urlparse.urljoin(base_url, video
_url)
+ def absolute_url(
item
_url):
+ return
urljoin(base_url, item
_url)
def parse_content_type(content_type):
if not content_type:
def parse_content_type(content_type):
if not content_type:
@@
-2208,7
+2208,7
@@
class InfoExtractor(object):
if src:
_, formats = _media_formats(src, media_type)
media_info['formats'].extend(formats)
if src:
_, formats = _media_formats(src, media_type)
media_info['formats'].extend(formats)
- media_info['thumbnail'] =
media_attributes.get('poster'
)
+ media_info['thumbnail'] =
absolute_url(media_attributes.get('poster')
)
if media_content:
for source_tag in re.findall(r'<source[^>]+>', media_content):
source_attributes = extract_attributes(source_tag)
if media_content:
for source_tag in re.findall(r'<source[^>]+>', media_content):
source_attributes = extract_attributes(source_tag)