mirror of
https://github.com/imputnet/cobalt.git
synced 2026-04-20 11:58:09 +00:00
api/rutube: fix yappy downloading
This commit is contained in:
parent
8cefaab1bd
commit
008e1e4a93
@ -145,6 +145,7 @@ export default function({
|
||||
params = { type: r.type };
|
||||
break;
|
||||
|
||||
case "rutube":
|
||||
case "vimeo":
|
||||
if (Array.isArray(r.urls)) {
|
||||
params = { type: "merge" };
|
||||
|
||||
@ -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" };
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user