4.6.0: video muting and soundcloud client_id

This commit is contained in:
wukko
2022-12-17 17:09:49 +06:00
parent f13a82e152
commit 7f1ba6b36b
26 changed files with 179 additions and 74 deletions

View File

@@ -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 await r.text()}).catch(() => {return false});
}).then(async (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]);