()
| 84 | } |
| 85 | |
| 86 | async function bato() { |
| 87 | const response = await fetch('https://batotomirrors.pages.dev'); |
| 88 | const body = await response.text(); |
| 89 | const $ = cheerio.load(body); |
| 90 | |
| 91 | // Bato url gave JS to list their bato endpoint when fetch() it. |
| 92 | const urlJS = $('script') |
| 93 | .map((i, el) => $(el).html()) |
| 94 | .get() |
| 95 | .find(text => text.includes('const domains')); |
| 96 | |
| 97 | const ExtractUrl = [...urlJS.matchAll(/url:\s*"(.*?)"/g)]; |
| 98 | const urls = ExtractUrl.map(m => new URL(m[1])); |
| 99 | |
| 100 | let formattedUrls = []; |
| 101 | for (const url of urls) { |
| 102 | formattedUrls.push('*://' + url.hostname + '/*'); |
| 103 | } |
| 104 | addChibiUrls('bato', formattedUrls, 'mainV2.ts'); |
| 105 | addChibiUrls('bato', formattedUrls, 'mainV3.ts'); |
| 106 | } |
| 107 | |
| 108 | async function mangapark() { |
| 109 | const response = await fetch('https://mangaparkmirrors.pages.dev'); |
nothing calls this directly
no test coverage detected