Update comix/comix.js
This commit is contained in:
+2
-2
@@ -102,12 +102,12 @@ async function extractImages(url) {
|
|||||||
try {
|
try {
|
||||||
const response = await fetch("https://comix.to/title/" + url);
|
const response = await fetch("https://comix.to/title/" + url);
|
||||||
const html = await response.text();
|
const html = await response.text();
|
||||||
|
|
||||||
const match = html.match(/\\"images\\":\[([^\]]+)\]/);
|
const match = html.match(/\\"images\\":\[([^\]]+)\]/);
|
||||||
if (match) {
|
if (match) {
|
||||||
const imagesJson = '[' + match[1].replace(/\\"/g, '"') + ']';
|
const imagesJson = '[' + match[1].replace(/\\"/g, '"') + ']';
|
||||||
const images = JSON.parse(imagesJson);
|
const images = JSON.parse(imagesJson);
|
||||||
const imageUrls = images.map(img => img.url);
|
const imageUrls = images.map(img => `https://passthrough-worker.simplepostrequest.workers.dev/?simple=${encodeURIComponent(img.url)}&referer=comix.to`);
|
||||||
results.push(...imageUrls);
|
results.push(...imageUrls);
|
||||||
return results;
|
return results;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user