2 from __future__ import unicode_literals
4 from .common import InfoExtractor
7 class Varzesh3IE(InfoExtractor):
8 _VALID_URL = r'https?://(?:www\.)?video\.varzesh3\.com/(?:[^/]+/)+(?P<id>[^/]+)/?'
10 'url': 'http://video.varzesh3.com/germany/bundesliga/5-%D9%88%D8%A7%DA%A9%D9%86%D8%B4-%D8%A8%D8%B1%D8%AA%D8%B1-%D8%AF%D8%B1%D9%88%D8%A7%D8%B2%D9%87%E2%80%8C%D8%A8%D8%A7%D9%86%D8%A7%D9%86%D8%9B%D9%87%D9%81%D8%AA%D9%87-26-%D8%A8%D9%88%D9%86%D8%AF%D8%B3/',
11 'md5': '2a933874cb7dce4366075281eb49e855',
15 'title': '۵ واکنش برتر دروازهبانان؛هفته ۲۶ بوندسلیگا',
16 'description': 'فصل ۲۰۱۵-۲۰۱۴',
17 'thumbnail': 're:^https?://.*\.jpg$',
21 def _real_extract(self, url):
22 display_id = self._match_id(url)
24 webpage = self._download_webpage(url, display_id)
26 video_url = self._search_regex(
27 r'<source[^>]+src="([^"]+)"', webpage, 'video url')
29 title = self._og_search_title(webpage)
30 description = self._html_search_regex(
31 r'(?s)<div class="matn">(.+?)</div>',
32 webpage, 'description', fatal=False)
33 thumbnail = self._og_search_thumbnail(webpage)
35 video_id = self._search_regex(
36 r"<link[^>]+rel='(?:canonical|shortlink)'[^>]+href='/\?p=([^']+)'",
37 webpage, display_id, default=display_id)
43 'description': description,
44 'thumbnail': thumbnail,