mirror of
https://github.com/imputnet/cobalt.git
synced 2026-04-23 02:08:12 +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 };
|
params = { type: r.type };
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case "rutube":
|
||||||
case "vimeo":
|
case "vimeo":
|
||||||
if (Array.isArray(r.urls)) {
|
if (Array.isArray(r.urls)) {
|
||||||
params = { type: "merge" };
|
params = { type: "merge" };
|
||||||
|
|||||||
@ -13,7 +13,7 @@ const delta = (a, b) => Math.abs(a - b);
|
|||||||
export default async function(obj) {
|
export default async function(obj) {
|
||||||
if (obj.yappyId) {
|
if (obj.yappyId) {
|
||||||
const yappy = await requestJSON(
|
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;
|
const yappyURL = yappy?.results?.find(r => r.id === obj.yappyId)?.link;
|
||||||
if (!yappyURL) return { error: "fetch.empty" };
|
if (!yappyURL) return { error: "fetch.empty" };
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user