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]+)/'
14 def _real_extract(self, url):
15 m = re.match(self._VALID_URL, url)
16 video_id = m.group('id')
18 # Note: There is an easier-to-parse configuration at
19 # http://www.aparat.com/video/video/config/videohash/%video_id
20 # but the URL in there does not work
22 webpage = self._download_webpage(url, video_id)
25 video_url = re.findall(r'file","(.+?.flv)"', webpage)[-1]
27 raise ExtractorError(u'No video URL found')
29 thumb = re.findall('<meta property="og:image" content="(.+?)"',webpage)[0]
31 title = self._search_regex(r'<b>([^"]+)</b>', webpage, u'title')