3 from .common
import InfoExtractor
10 class ClippitIE(InfoExtractor
):
12 _VALID_URL
= r
'https?://(?:www\.)?clippituser\.tv/c/(?P<id>[a-z]+)'
14 'url': 'https://www.clippituser.tv/c/evmgm',
15 'md5': '963ae7a59a2ec4572ab8bf2f2d2c5f09',
19 'title': 'Bye bye Brutus. #BattleBots - Clippit',
20 'uploader': 'lizllove',
21 'uploader_url': 'https://www.clippituser.tv/p/lizllove',
22 'timestamp': 1472183818,
23 'upload_date': '20160826',
24 'description': 'BattleBots | ABC',
25 'thumbnail': r
're:^https?://.*\.jpg$',
29 def _real_extract(self
, url
):
30 video_id
= self
._match
_id
(url
)
31 webpage
= self
._download
_webpage
(url
, video_id
)
33 title
= self
._html
_search
_regex
(r
'<title.*>(.+?)</title>', webpage
, 'title')
35 FORMATS
= ('sd', 'hd')
36 quality
= qualities(FORMATS
)
38 for format_id
in FORMATS
:
39 url
= self
._html
_search
_regex
(rf
'data-{format_id}-file="(.+?)"',
40 webpage
, 'url', fatal
=False)
43 match
= re
.search(r
'/(?P<height>\d+)\.mp4', url
)
46 'format_id': format_id
,
47 'quality': quality(format_id
),
48 'height': int(match
.group('height')) if match
else None,
51 uploader
= self
._html
_search
_regex
(r
'class="username".*>\s+(.+?)\n',
52 webpage
, 'uploader', fatal
=False)
53 uploader_url
= ('https://www.clippituser.tv/p/' + uploader
54 if uploader
else None)
56 timestamp
= self
._html
_search
_regex
(r
'datetime="(.+?)"',
57 webpage
, 'date', fatal
=False)
58 thumbnail
= self
._html
_search
_regex
(r
'data-image="(.+?)"',
59 webpage
, 'thumbnail', fatal
=False)
66 'uploader_url': uploader_url
,
67 'timestamp': parse_iso8601(timestamp
),
68 'description': self
._og
_search
_description
(webpage
),
69 'thumbnail': thumbnail
,