Browse Source

using _parse_html5_media_entries to parse video tag

totalwebcasting
Xie Yanbo 8 years ago
parent
commit
a493f10208
1 changed files with 7 additions and 7 deletions
  1. +7
    -7
      youtube_dl/extractor/miaopai.py

+ 7
- 7
youtube_dl/extractor/miaopai.py View File

@ -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

Loading…
Cancel
Save