feat: implement Hitomi.la scraper with dynamic gg.js parsing and image proxy integration

This commit is contained in:
armonica committed 2026-08-31 23:59:30 +09:00
1 parent 18ea6596e5
commit 3bad81169e
21 files changed
+6824 -4

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
const fs = require('fs');
let commonJs = fs.readFileSync('scratch/common.js', 'utf8');
let ggJs = fs.readFileSync('scratch/gg.js', 'utf8');
let galleryJs = fs.readFileSync('scratch/gallery_4159707.js', 'utf8');
global.document = { location: { hostname: 'hitomi.la' } };
global.window = global;
global.navigator = { platform: 'Win32', userAgent: 'Chrome' };
global.gg = {};
global.$ = function() { return { ready: function() {}, on: function() {}, remove: function() {} }; };
global.$.ajax = function() {};
eval(commonJs);
eval(ggJs);
eval(galleryJs);
const t1 = url_from_url_from_hash(galleryinfo.id, galleryinfo.files[0], 'webpbigtn', 'webp', 'tn');
const t2 = url_from_url_from_hash(galleryinfo.id, galleryinfo.files[0], 'bigtn', 'webp', 'tn');
const t3 = url_from_url_from_hash(galleryinfo.id, galleryinfo.files[0], 'webpsmallsmalltn', 'webp', 'tn');
console.log("t1 (webpbigtn):", t1);
console.log("t2 (bigtn):", t2);
console.log("t3 (webpsmallsmalltn):", t3);