Skip to content

Commit

Permalink
🤷
Browse files Browse the repository at this point in the history
  • Loading branch information
OshekharO authored Oct 8, 2023
1 parent 01ae2d1 commit 28b6ff6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions repo/animepahe.ru.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// ==/MiruExtension==

export default class extends Extension {
async search(kw, page) {
async search(kw) {
const res = await this.request(`/api?m=search&q=${kw}`);
// console.log(res);
return res.data.map((item) => ({
Expand Down Expand Up @@ -82,11 +82,11 @@ export default class extends Extension {
}
})
// console.log((/data-src="https:\/\/kwik.cx.+?"/g).exec(res)[parseInt(url_split[1])]);
console.log(res.match(/data-src="https:\/\/kwik.cx.+?"/g))
// console.log(res.match(/data-src="https:\/\/kwik.cx.+?"/g))
const src_match = res.match(/data-src="https:\/\/kwik.cx.+?"/g)[parseInt(url_split[1])]; //480,720,1080 === [0],[1],[2]
console.log(src_match);
// console.log(src_match);
const src = src_match.match(/data-src="(.+?)"/)[1];
console.log(src);
// console.log(src);
const hid_res = await this.request("",{
headers:{
"Miru-Url": src,
Expand All @@ -96,12 +96,12 @@ export default class extends Extension {
})
const hid_script = hid_res.match(/eval\(f.+?\}\)\)/g)[1];
const decode_script = eval(hid_script.match(/eval(.+)/)[1]);
//the obfuscated script look like eval(function(p,a,c,k,e,d){e=function(c){return(c<a?......
// the obfuscated script look like eval(function(p,a,c,k,e,d){e=function(c){return(c<a?......
const decode_url = decode_script.match(/source='(.+?)'/)[1];
return {
type: "hls",
url: decode_url,
};
}
}


0 comments on commit 28b6ff6

Please sign in to comment.