megacloud-fix #1021
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/drblgn/rabbit_wasm/blob/main/rabbit.ts
|
||||||
// solution inspired from https://github.com/shimizudev/consumet.ts/blob/master/dist/extractors/megacloud/megacloud.getsrcs.js
|
// 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 referrer = 'https://hianime.to';
|
||||||
const user_agent = navigator.userAgent;
|
const user_agent = navigator.userAgent;
|
||||||
let wasm;
|
let wasm;
|
||||||
|
@ -31,7 +31,7 @@ const image_data = {
|
||||||
data: window.decoded_png,
|
data: window.decoded_png,
|
||||||
};
|
};
|
||||||
const canvas = {
|
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,
|
width: 0,
|
||||||
height: 0,
|
height: 0,
|
||||||
style: {
|
style: {
|
||||||
|
@ -58,7 +58,7 @@ const fake_window = {
|
||||||
},
|
},
|
||||||
origin: 'https://megacloud.tv',
|
origin: 'https://megacloud.tv',
|
||||||
location: {
|
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',
|
origin: 'https://megacloud.tv',
|
||||||
},
|
},
|
||||||
performance: {
|
performance: {
|
||||||
|
@ -676,7 +676,7 @@ async function getSources(xrax) {
|
||||||
let res = {};
|
let res = {};
|
||||||
try {
|
try {
|
||||||
await V();
|
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 +
|
fake_window.pid +
|
||||||
'&v=' +
|
'&v=' +
|
||||||
fake_window.localStorage.kversion +
|
fake_window.localStorage.kversion +
|
||||||
|
@ -688,7 +688,7 @@ async function getSources(xrax) {
|
||||||
headers: {
|
headers: {
|
||||||
'User-Agent': user_agent,
|
'User-Agent': user_agent,
|
||||||
//"Referrer": fake_window.origin + "/v2/embed-4/" + xrax + "?z=",
|
//"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',
|
'X-Requested-With': 'XMLHttpRequest',
|
||||||
},
|
},
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue