aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXie Yanbo <xieyanbo@gmail.com>2016-09-05 23:08:33 +0800
committerXie Yanbo <xieyanbo@gmail.com>2016-09-05 23:08:33 +0800
commita493f1020888e87a464ab8a948c797c18fc3aca3 (patch)
tree3adceb3f061911d19742ad4a43ad814d773ecaac
parent95be19d436d1938d104310e194e85ea5a10c3353 (diff)
downloadyoutube-dl-a493f1020888e87a464ab8a948c797c18fc3aca3.tar.xz
using _parse_html5_media_entries to parse video tag
-rw-r--r--youtube_dl/extractor/miaopai.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/youtube_dl/extractor/miaopai.py b/youtube_dl/extractor/miaopai.py
index c36b441b8..2477d1009 100644
--- 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, '')
- 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_url,
- 'thumbnail': thumbnail,
- }
+ info.update({'id': video_id,
+ 'title': title,
+ 'thumbnail': thumbnail,
+ })
+ return info