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'; import { cleanString } from '../../sub/utils.js';
async function requestJSON(url) { async function requestJSON(url) {
let r = await fetch(url) try {
.then((r) => { return r.json() }) const r = await fetch(url);
.catch(() => {}); return await r.json();
return r } catch {}
} }
export default async function(obj) { export default async function(obj) {