From 65d7ca0453e51ce87088d9760e4c2953fe73c4a0 Mon Sep 17 00:00:00 2001 From: wukko Date: Mon, 29 Apr 2024 21:31:43 +0600 Subject: [PATCH] rutube: update requestJSON function --- src/modules/processing/services/rutube.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/processing/services/rutube.js b/src/modules/processing/services/rutube.js index 3e79a7dd..b26bfb19 100644 --- a/src/modules/processing/services/rutube.js +++ b/src/modules/processing/services/rutube.js @@ -4,10 +4,10 @@ import { maxVideoDuration } from "../../config.js"; import { cleanString } from '../../sub/utils.js'; async function requestJSON(url) { - let r = await fetch(url) - .then((r) => { return r.json() }) - .catch(() => {}); - return r + try { + const r = await fetch(url); + return await r.json(); + } catch {} } export default async function(obj) {