mirror of
https://github.com/imputnet/cobalt.git
synced 2026-01-26 08:41:47 +00:00
updated readme and fixed some things
This commit is contained in:
@@ -2,7 +2,7 @@ import { quality, services } from "../config.js";
|
||||
|
||||
export default async function(obj) {
|
||||
try {
|
||||
let api = await fetch(`https://player.vimeo.com/video/${obj.id}/config`).then(async (r) => {return r.json()}).catch(() => {return false});
|
||||
let api = await fetch(`https://player.vimeo.com/video/${obj.id}/config`).then((r) => {return r.json()}).catch(() => {return false});
|
||||
if (!api) return { error: 'ErrorCouldntFetch' };
|
||||
|
||||
let downloadType = "";
|
||||
@@ -32,7 +32,7 @@ export default async function(obj) {
|
||||
return { urls: best["url"], filename: `tumblr_${obj.id}.mp4` };
|
||||
case "dash":
|
||||
let masterJSONURL = api["request"]["files"]["dash"]["cdns"]["akfire_interconnect_quic"]["url"];
|
||||
let masterJSON = await fetch(masterJSONURL).then(async (r) => {return r.json()}).catch(() => {return false});
|
||||
let masterJSON = await fetch(masterJSONURL).then((r) => {return r.json()}).catch(() => {return false});
|
||||
if (!masterJSON) return { error: 'ErrorCouldntFetch' };
|
||||
if (masterJSON.video) {
|
||||
let type = "";
|
||||
|
||||
Reference in New Issue
Block a user