From 918113db3b7e66b3c450345a436379e87150afe7 Mon Sep 17 00:00:00 2001 From: nomevi <108267441+nomevi@users.noreply.github.com> Date: Sun, 10 Jul 2022 01:33:32 +0000 Subject: [PATCH] Break out video_url and title Co-authored-by: dirkf --- youtube_dl/extractor/livestreamfails.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/youtube_dl/extractor/livestreamfails.py b/youtube_dl/extractor/livestreamfails.py index acf486f74..aabc7ecd2 100644 --- a/youtube_dl/extractor/livestreamfails.py +++ b/youtube_dl/extractor/livestreamfails.py @@ -36,10 +36,13 @@ class LivestreamfailsIE(InfoExtractor): # Use the same endpoint here to avoid loading and parsing the provided page (which requires JS) api_response = self._download_json('https://api.livestreamfails.com/clip/' + id, id) + video_url = 'https://livestreamfails-video-prod.b-cdn.net/video/' + api_response['videoId'] + title = api_response['label'] + return { 'id': id, - 'url': 'https://livestreamfails-video-prod.b-cdn.net/video/' + api_response['videoId'], - 'title': api_response['label'], + 'url': video_url, + 'title': title, 'display_id': api_response.get('sourceId'), # Twitch ID of clip 'timestamp': parse_iso8601(api_response.get('createdAt')), 'creator': try_get(api_response, lambda x: x['streamer']['label'], compat_str),