]>
Raphaël G. Git Repositories - youtubedl/blob - youtube_dl/extractor/varzesh3.py
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
,