10 lines
425 B
JavaScript
10 lines
425 B
JavaScript
const html = require('fs').readFileSync('scratch/eh_gallery_4159771.html', 'utf8');
|
|
const pageLinkRegex = /href="(https:\/\/e-hentai\.org\/s\/([a-z0-9]+)\/(\d+)-(\d+))"/g;
|
|
let m;
|
|
const pages = [];
|
|
while ((m = pageLinkRegex.exec(html)) !== null) {
|
|
pages.push({ url: m[1], token: m[2], gid: m[3], page: parseInt(m[4]) });
|
|
}
|
|
console.log("Found pages count:", pages.length);
|
|
console.log("First 3 pages:", pages.slice(0, 3));
|