api/rutube: fix yappy downloading

This commit is contained in:
wukko 2026-03-30 16:03:33 +06:00
parent 8cefaab1bd
commit 008e1e4a93
No known key found for this signature in database
GPG Key ID: 3E30B3F26C7B4AA2
2 changed files with 2 additions and 1 deletions

View File

@ -145,6 +145,7 @@ export default function({
params = { type: r.type };
break;
case "rutube":
case "vimeo":
if (Array.isArray(r.urls)) {
params = { type: "merge" };

View File

@ -13,7 +13,7 @@ const delta = (a, b) => Math.abs(a - b);
export default async function(obj) {
if (obj.yappyId) {
const yappy = await requestJSON(
`https://rutube.ru/pangolin/api/web/yappy/yappypage/?client=wdp&videoId=${obj.yappyId}&page=1&page_size=15`
`https://rutube.ru/pangolin/api/web/yappy/v4/yappypage/?client=wdp&videoId=${obj.yappyId}&page=1&page_size=1`
)
const yappyURL = yappy?.results?.find(r => r.id === obj.yappyId)?.link;
if (!yappyURL) return { error: "fetch.empty" };