1 from .common
import InfoExtractor
2 from ..utils
import format_field
, traverse_obj
, unified_timestamp
5 class LivestreamfailsIE(InfoExtractor
):
6 _VALID_URL
= r
'https?://(?:www\.)?livestreamfails\.com/(?:clip|post)/(?P<id>[0-9]+)'
8 'url': 'https://livestreamfails.com/clip/139200',
9 'md5': '8a03aea1a46e94a05af6410337463102',
13 'display_id': 'ConcernedLitigiousSalmonPeteZaroll-O8yo9W2L8OZEKhV2',
14 'title': 'Streamer jumps off a trampoline at full speed',
15 'creator': 'paradeev1ch',
16 'thumbnail': r
're:^https?://.+',
17 'timestamp': 1656271785,
18 'upload_date': '20220626',
21 'url': 'https://livestreamfails.com/post/139200',
22 'only_matching': True,
25 def _real_extract(self
, url
):
26 video_id
= self
._match
_id
(url
)
27 api_response
= self
._download
_json
(f
'https://api.livestreamfails.com/clip/{video_id}', video_id
)
31 'display_id': api_response
.get('sourceId'),
32 'timestamp': unified_timestamp(api_response
.get('createdAt')),
33 'url': f
'https://livestreamfails-video-prod.b-cdn.net/video/{api_response["videoId"]}',
34 'title': api_response
.get('label'),
35 'creator': traverse_obj(api_response
, ('streamer', 'label')),
36 'thumbnail': format_field(api_response
, 'imageId', 'https://livestreamfails-image-prod.b-cdn.net/image/%s'),