Update comix/comix.js
This commit is contained in:
+2
-2
@@ -102,12 +102,12 @@ async function extractImages(url) {
|
||||
try {
|
||||
const response = await fetch("https://comix.to/title/" + url);
|
||||
const html = await response.text();
|
||||
|
||||
|
||||
const match = html.match(/\\"images\\":\[([^\]]+)\]/);
|
||||
if (match) {
|
||||
const imagesJson = '[' + match[1].replace(/\\"/g, '"') + ']';
|
||||
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);
|
||||
return results;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user