]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/worldstarhiphop.py
1 from __future__
import unicode_literals
3 from .common
import InfoExtractor
6 class WorldStarHipHopIE(InfoExtractor
):
7 _VALID_URL
= r
'https?://(?:www|m)\.worldstar(?:candy|hiphop)\.com/(?:videos|android)/video\.php\?.*?\bv=(?P<id>[^&]+)'
9 'url': 'http://www.worldstarhiphop.com/videos/video.php?v=wshh6a7q1ny0G34ZwuIO',
10 'md5': '9d04de741161603bf7071bbf4e883186',
12 'id': 'wshh6a7q1ny0G34ZwuIO',
14 'title': 'KO Of The Week: MMA Fighter Gets Knocked Out By Swift Head Kick!'
17 'url': 'http://m.worldstarhiphop.com/android/video.php?v=wshh6a7q1ny0G34ZwuIO',
18 'only_matching': True,
21 def _real_extract(self
, url
):
22 video_id
= self
._match
_id
(url
)
23 webpage
= self
._download
_webpage
(url
, video_id
)
25 entries
= self
._parse
_html
5_media
_entries
(url
, webpage
, video_id
)
28 return self
.url_result(url
, 'Generic')
30 title
= self
._html
_search
_regex
(
31 [r
'(?s)<div class="content-heading">\s*<h1>(.*?)</h1>',
32 r
'<span[^>]+class="tc-sp-pinned-title">(.*)</span>'],