rutube: update requestJSON function

This commit is contained in:
wukko 2024-04-29 21:31:43 +06:00
parent 26358725e9
commit 65d7ca0453
No known key found for this signature in database
GPG Key ID: 3E30B3F26C7B4AA2

View File

@ -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) {