]>
jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/cloudy.py
1 from .common
import InfoExtractor
8 class CloudyIE(InfoExtractor
):
10 _VALID_URL
= r
'https?://(?:www\.)?cloudy\.ec/(?:v/|embed\.php\?.*?\bid=)(?P<id>[A-Za-z0-9]+)'
12 'url': 'https://www.cloudy.ec/v/af511e2527aac',
13 'md5': '29832b05028ead1b58be86bf319397ca',
15 'id': 'af511e2527aac',
17 'title': 'Funny Cats and Animals Compilation june 2013',
18 'upload_date': '20130913',
22 'url': 'http://www.cloudy.ec/embed.php?autoplay=1&id=af511e2527aac',
23 'only_matching': True,
26 def _real_extract(self
, url
):
27 video_id
= self
._match
_id
(url
)
29 webpage
= self
._download
_webpage
(
30 'https://www.cloudy.ec/embed.php', video_id
, query
={
36 info
= self
._parse
_html
5_media
_entries
(url
, webpage
, video_id
)[0]
38 webpage
= self
._download
_webpage
(
39 'https://www.cloudy.ec/v/%s' % video_id
, video_id
, fatal
=False)
43 'title': self
._search
_regex
(
44 r
'<h\d[^>]*>([^<]+)<', webpage
, 'title'),
45 'upload_date': unified_strdate(self
._search
_regex
(
46 r
'>Published at (\d{4}-\d{1,2}-\d{1,2})', webpage
,
47 'upload date', fatal
=False)),
48 'view_count': str_to_int(self
._search
_regex
(
49 r
'([\d,.]+) views<', webpage
, 'view count', fatal
=False)),
52 if not info
.get('title'):
53 info
['title'] = video_id