- }
-
- def _real_extract(self, url):
- mobj = re.match(self._VALID_URL, url)
- id = mobj.group(1)
- webpage = self._download_webpage(url, id)
- embed_url = self._html_search_regex(r'"(https://www.wat.tv/embedframe/.*?)"',
- webpage, 'embed url')
- embed_page = self._download_webpage(embed_url, id, u'Downloading embed player page')
- wat_id = self._search_regex(r'UVID=(.*?)&', embed_page, 'wat id')
- wat_info = self._download_webpage('http://www.wat.tv/interface/contentv3/%s' % wat_id, id, u'Downloading Wat info')
- wat_info = json.loads(wat_info)['media']
- wat_url = wat_info['url']
- return self.url_result(wat_url, 'Wat')