From 26dc85adb44091139b0273bec7a525c7e1313e41 Mon Sep 17 00:00:00 2001 From: nomevi <108267441+nomevi@users.noreply.github.com> Date: Sun, 10 Jul 2022 01:35:21 +0200 Subject: [PATCH] Use IE._download_json() --- youtube_dl/extractor/livestreamfails.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/youtube_dl/extractor/livestreamfails.py b/youtube_dl/extractor/livestreamfails.py index da2472601..22180d986 100644 --- a/youtube_dl/extractor/livestreamfails.py +++ b/youtube_dl/extractor/livestreamfails.py @@ -2,7 +2,6 @@ from __future__ import unicode_literals from .common import InfoExtractor -import json import time import calendar @@ -29,7 +28,7 @@ class LivestreamfailsIE(InfoExtractor): # https://livestreamfails.com/clip/id uses https://api.livestreamfails.com/clip/ to fetch the video metadata # Use the same endpoint here to avoid loading and parsing the provided page (which requires JS) - api_response = json.loads(self._download_webpage('https://api.livestreamfails.com/clip/' + id, id)) + api_response = self._download_json('https://api.livestreamfails.com/clip/' + id, id) # Get the input timestamp (test case gives 2022-06-26T19:29:45.515Z) timestamp = api_response.get('createdAt')