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