yoinked from yuzono
This commit is contained in:
parent
9a5e2a9083
commit
cc12318692
1 changed files with 13 additions and 13 deletions
|
@ -2,7 +2,7 @@
|
|||
// solution inspired from https://github.com/drblgn/rabbit_wasm/blob/main/rabbit.ts
|
||||
// solution inspired from https://github.com/shimizudev/consumet.ts/blob/master/dist/extractors/megacloud/megacloud.getsrcs.js
|
||||
|
||||
const embed_url = 'https://megacloud.tv/embed-2/e-1/';
|
||||
const embed_url = 'https://megacloud.tv/embed-2/v2/e-1/';
|
||||
const referrer = 'https://hianime.to';
|
||||
const user_agent = navigator.userAgent;
|
||||
let wasm;
|
||||
|
@ -31,7 +31,7 @@ const image_data = {
|
|||
data: window.decoded_png,
|
||||
};
|
||||
const canvas = {
|
||||
baseUrl: 'https://megacloud.tv/embed-2/e-1/1hnXq7VzX0Ex?k=1',
|
||||
baseUrl: 'https://megacloud.tv/embed-2/v2/e-1/1hnXq7VzX0Ex?k=1',
|
||||
width: 0,
|
||||
height: 0,
|
||||
style: {
|
||||
|
@ -58,7 +58,7 @@ const fake_window = {
|
|||
},
|
||||
origin: 'https://megacloud.tv',
|
||||
location: {
|
||||
href: 'https://megacloud.tv/embed-2/e-1/1hnXq7VzX0Ex?k=1',
|
||||
href: 'https://megacloud.tv/embed-2/v2/e-1/1hnXq7VzX0Ex?k=1',
|
||||
origin: 'https://megacloud.tv',
|
||||
},
|
||||
performance: {
|
||||
|
@ -676,7 +676,7 @@ async function getSources(xrax) {
|
|||
let res = {};
|
||||
try {
|
||||
await V();
|
||||
let getSourcesUrl = 'https://megacloud.tv/embed-2/ajax/e-1/getSources?id=' +
|
||||
let getSourcesUrl = 'https://megacloud.tv/embed-2/v2/e-1/getSources?id=' +
|
||||
fake_window.pid +
|
||||
'&v=' +
|
||||
fake_window.localStorage.kversion +
|
||||
|
@ -688,7 +688,7 @@ async function getSources(xrax) {
|
|||
headers: {
|
||||
'User-Agent': user_agent,
|
||||
//"Referrer": fake_window.origin + "/v2/embed-4/" + xrax + "?z=",
|
||||
Referer: embed_url + xrax + '?k=1',
|
||||
Referer: embed_url + xrax + '?k=1&autoPlay=1&oa=0&asi=1',
|
||||
'X-Requested-With': 'XMLHttpRequest',
|
||||
},
|
||||
method: 'GET',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue