mirror of
https://github.com/imputnet/cobalt.git
synced 2026-01-07 07:21:19 +00:00
updated readme and fixed some things
This commit is contained in:
@@ -7,7 +7,7 @@ export default async function(obj) {
|
||||
let html;
|
||||
html = await fetch(`https://vk.com/video-${obj.userId}_${obj.videoId}`, {
|
||||
headers: {"user-agent": genericUserAgent}
|
||||
}).then(async (r) => {return r.text()}).catch(() => {return false});
|
||||
}).then((r) => {return r.text()}).catch(() => {return false});
|
||||
if (!html) return { error: 'ErrorCouldntFetch' };
|
||||
if (html.includes(`{"lang":`)) {
|
||||
let js = JSON.parse('{"lang":' + html.split(`{"lang":`)[1].split(']);')[0]);
|
||||
|
||||
Reference in New Issue
Block a user