]>
jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/varzesh3.py
2 from __future__
import unicode_literals
4 from .common
import InfoExtractor
12 class Varzesh3IE(InfoExtractor
):
13 _VALID_URL
= r
'https?://(?:www\.)?video\.varzesh3\.com/(?:[^/]+/)+(?P<id>[^/]+)/?'
15 '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/',
16 'md5': '2a933874cb7dce4366075281eb49e855',
20 'title': '۵ واکنش برتر دروازهبانان؛هفته ۲۶ بوندسلیگا',
21 'description': 'فصل ۲۰۱۵-۲۰۱۴',
22 'thumbnail': r
're:^https?://.*\.jpg$',
24 'skip': 'HTTP 404 Error',
26 'url': 'http://video.varzesh3.com/video/112785/%D8%AF%D9%84%D9%87-%D8%B9%D9%84%DB%8C%D8%9B-%D8%B3%D8%AA%D8%A7%D8%B1%D9%87-%D9%86%D9%88%D8%B8%D9%87%D9%88%D8%B1-%D9%84%DB%8C%DA%AF-%D8%A8%D8%B1%D8%AA%D8%B1-%D8%AC%D8%B2%DB%8C%D8%B1%D9%87',
27 'md5': '841b7cd3afbc76e61708d94e53a4a4e7',
31 'title': 'دله علی؛ ستاره نوظهور لیگ برتر جزیره',
32 'description': 'فوتبال 120',
34 'expected_warnings': ['description'],
37 def _real_extract(self
, url
):
38 display_id
= self
._match
_id
(url
)
40 webpage
= self
._download
_webpage
(url
, display_id
)
42 video_url
= self
._search
_regex
(
43 r
'<source[^>]+src="([^"]+)"', webpage
, 'video url')
45 title
= remove_start(self
._html
_search
_regex
(
46 r
'<title>([^<]+)</title>', webpage
, 'title'), 'ویدیو ورزش 3 | ')
48 description
= self
._html
_search
_regex
(
49 r
'(?s)<div class="matn">(.+?)</div>',
50 webpage
, 'description', default
=None)
51 if description
is None:
52 description
= clean_html(self
._html
_search
_meta
('description', webpage
))
54 thumbnail
= self
._og
_search
_thumbnail
(webpage
, default
=None)
56 fb_sharer_url
= self
._search
_regex
(
57 r
'<a[^>]+href="(https?://www\.facebook\.com/sharer/sharer\.php?[^"]+)"',
58 webpage
, 'facebook sharer URL', fatal
=False)
59 sharer_params
= parse_qs(fb_sharer_url
)
60 thumbnail
= sharer_params
.get('p[images][0]', [None])[0]
62 video_id
= self
._search
_regex
(
63 r
"<link[^>]+rel='(?:canonical|shortlink)'[^>]+href='/\?p=([^']+)'",
64 webpage
, display_id
, default
=None)
66 video_id
= self
._search
_regex
(
67 r
'var\s+VideoId\s*=\s*(\d+);', webpage
, 'video id',
74 'description': description
,
75 'thumbnail': thumbnail
,