]>
jfr.im git - yt-dlp.git/blob - youtube_dl/extractor/dump.py
2 from __future__
import unicode_literals
6 from .common
import InfoExtractor
11 class DumpIE(InfoExtractor
):
12 _VALID_URL
= r
'^https?://(?:www\.)?dump\.com/(?P<id>[a-zA-Z0-9]+)/'
15 u
'url': u
'http://www.dump.com/oneus/',
16 u
'file': u
'oneus.flv',
17 u
'md5': u
'ad71704d1e67dfd9e81e3e8b42d69d99',
19 u
"title": u
"He's one of us.",
23 def _real_extract(self
, url
):
24 m
= re
.match(self
._VALID
_URL
, url
)
25 video_id
= m
.group('id')
27 # Note: There is an easier-to-parse configuration at
28 # http://www.aparat.com/video/video/config/videohash/%video_id
29 # but the URL in there does not work
31 webpage
= self
._download
_webpage
(url
, video_id
)
34 video_url
= re
.findall(r
'file","(.+?.flv)"', webpage
)[-1]
36 raise ExtractorError(u
'No video URL found')
38 thumb
= re
.findall('<meta property="og:image" content="(.+?)"',webpage
)[0]
40 title
= self
._search
_regex
(r
'<b>([^"]+)</b>', webpage
, u
'title')