2 from __future__ import unicode_literals
6 from .common import InfoExtractor
8 class GorillaVidIE(InfoExtractor):
9 _VALID_URL = r'https?://(?:www.)?gorillavid.in/(?:embed-)?(?P<id>\w+)(?:\-\d+x\d+)?(?:.html)?'
11 'url': "http://gorillavid.in/z08zf8le23c6",
12 'md5': 'c9e293ca74d46cad638e199c3f3fe604',
16 'title': 'Say something nice',
20 def _real_extract(self, url):
21 mobj = re.match(self._VALID_URL, url)
22 video_id = mobj.group('id')
24 webpage = self._download_webpage(url, video_id)
25 title = self._html_search_regex(r"name=['\"]fname['\"]\s+value=['\"](.*?)['\"]", webpage, u"video title")
27 # download embed page again with cookies to get url
28 embed_url = "http://gorillavid.in/embed-{0}-960x480.html".format(video_id)
29 webpage = self._download_webpage(embed_url, video_id, note=u'Downloading webpage again (with cookie)')
30 url = self._html_search_regex(r'file:\s+["\'](http://.*?video.\w{3})["\']', webpage, url)