feat: implement initial E-Hentai scraper and associated test scaffolding
This commit is contained in:
1 parent
3bad81169e
commit
ee9ee9776d
14 files changed
+2777
-2
No files matched your search
@@ -0,0 +1,9 @@
|
||||
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));
|
||||
Reference in new issue
Block a user