- embed_url = ('http://www.aparat.com/video/video/embed/videohash/' +
- video_id + '/vt/frame')
- webpage = self._download_webpage(embed_url, video_id)
-
- video_urls = [video_url.replace('\\/', '/') for video_url in re.findall(
- r'(?:fileList\[[0-9]+\]\s*=|"file"\s*:)\s*"([^"]+)"', webpage)]
- for i, video_url in enumerate(video_urls):
- req = HEADRequest(video_url)
- res = self._request_webpage(
- req, video_id, note='Testing video URL %d' % i, errnote=False)
- if res:
- break
- else:
- raise ExtractorError('No working video URLs found')
+ webpage = self._download_webpage(
+ 'http://www.aparat.com/video/video/embed/vt/frame/showvideo/yes/videohash/' + video_id,
+ video_id)