]>
jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/myvideoge.py
2 from __future__
import unicode_literals
4 from .common
import InfoExtractor
5 from ..utils
import js_to_json
8 class MyVideoGeIE(InfoExtractor
):
9 _VALID_URL
= r
'https?://(?:www\.)?myvideo\.ge/v/(?P<id>[0-9]+)'
11 'url': 'https://www.myvideo.ge/v/3941048',
12 'md5': '8c192a7d2b15454ba4f29dc9c9a52ea9',
16 'title': 'The best prikol',
17 'thumbnail': r
're:^https?://.*\.jpg$',
18 'uploader': 'md5:d72addd357b0dd914e704781f7f777d8',
19 'description': 'md5:5c0371f540f5888d603ebfedd46b6df3'
23 def _real_extract(self
, url
):
24 video_id
= self
._match
_id
(url
)
25 webpage
= self
._download
_webpage
(url
, video_id
)
27 title
= self
._html
_search
_regex
(r
'<h1[^>]*>([^<]+)</h1>', webpage
, 'title')
28 description
= self
._og
_search
_description
(webpage
)
29 thumbnail
= self
._html
_search
_meta
(['og:image'], webpage
)
30 uploader
= self
._search
_regex
(r
'<a[^>]+class="mv_user_name"[^>]*>([^<]+)<', webpage
, 'uploader', fatal
=False)
32 jwplayer_sources
= self
._parse
_json
(
34 r
"(?s)jwplayer\(\"mvplayer
\"\
).setup\
(.*?sources
: (.*?
])", webpage, 'jwplayer sources'),
35 video_id, transform_source=js_to_json)
38 if f['label'] == 'SD':
40 elif f['label'] == 'HD':
45 jwplayer_sources = sorted(jwplayer_sources, key=_formats_key)
47 formats = self._parse_jwplayer_formats(jwplayer_sources, video_id)
52 'description': description,
55 'thumbnail': thumbnail