]>
jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/streamanity.py
1 from .common
import InfoExtractor
4 class StreamanityIE(InfoExtractor
):
5 _VALID_URL
= r
'https?://(?:www\.)?streamanity\.com/video/(?P<id>[A-Za-z0-9]+)'
7 'url': 'https://streamanity.com/video/9DFPTnuYi8f2',
8 'md5': '6ab171e8d4a02ad5dcbff6bea44cf5a1',
12 'title': 'Bitcoin vs The Lighting Network',
13 'thumbnail': r
're:https://res\.cloudinary\.com/.+\.png',
15 'uploader': 'Tom Bombadil (Freddy78)',
18 'url': 'https://streamanity.com/video/JktOUjSlfzTD',
19 'md5': '31f131e28abd3377c38be586a59532dc',
23 'title': 'Share data when you see it',
24 'thumbnail': r
're:https://res\.cloudinary\.com/.+\.png',
25 'description': 'Reposting as data should be public and stored on blockchain',
26 'uploader': 'digitalcurrencydaily',
30 def _real_extract(self
, url
):
31 video_id
= self
._match
_id
(url
)
32 video_info
= self
._download
_json
(
33 f
'https://app.streamanity.com/api/video/{video_id}', video_id
)['data']['video']
35 formats
= self
._extract
_m
3u8_formats
(
36 f
'https://stream.mux.com/{video_info["play_id"]}.m3u8?token={video_info["token"]}',
37 video_id
, ext
='mp4', m3u8_id
='hls')
38 self
._sort
_formats
(formats
)
42 'title': video_info
['title'],
43 'description': video_info
.get('description'),
44 'uploader': video_info
.get('author_name'),
46 'thumbnail': video_info
.get('thumb'),