projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
95be19d
)
using _parse_html5_media_entries to parse video tag
author
Xie Yanbo
<xieyanbo@gmail.com>
Mon, 5 Sep 2016 15:08:33 +0000
(23:08 +0800)
committer
Xie Yanbo
<xieyanbo@gmail.com>
Mon, 5 Sep 2016 15:08:33 +0000
(23:08 +0800)
youtube_dl/extractor/miaopai.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/miaopai.py
b/youtube_dl/extractor/miaopai.py
index c36b441b8edf145cc43ede9c1558608357c7dc4e..2477d1009cad1343c8348030a230f673b0ef5d39 100644
(file)
--- a/
youtube_dl/extractor/miaopai.py
+++ b/
youtube_dl/extractor/miaopai.py
@@
-34,11
+34,11
@@
class MiaoPaiIE(InfoExtractor):
'title')
regex = r"""<div *class=['"]video_img[^>]*data-url=['"]([^'"]*\.jpg)['"]"""
thumbnail = self._html_search_regex(regex, webpage, '')
'title')
regex = r"""<div *class=['"]video_img[^>]*data-url=['"]([^'"]*\.jpg)['"]"""
thumbnail = self._html_search_regex(regex, webpage, '')
- regex = r"""<video *[^>]*src=['"]([^'"]*)['"]""",
- video_url = self._html_search_regex(regex, webpage, '')
+ videos = self._parse_html5_media_entries(url, webpage, video_id)
+ info = videos[0]
-
return
{'id': video_id,
- 'title': title,
-
'url': video_ur
l,
- 'thumbnail': thumbnail,
- }
+
info.update(
{'id': video_id,
+
'title': title,
+
'thumbnail': thumbnai
l,
+ })
+ return info