Closure-RI commited on
Commit
7e16c92
·
verified ·
1 Parent(s): 8c6610c

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +6 -2
index.js CHANGED
@@ -527,8 +527,9 @@ async function nhentai(url) {
527
  console.log(jsonData);
528
 
529
  const imgList = jsonData.images.pages.map((_, index) => ({
530
- path: `https://i5.nhentai.net/galleries/${jsonData.media_id}/${index + 1}.jpg&f=1&nofb=1`
531
- }));
 
532
 
533
  const imagePaths = await downloadImageNhs(imgList, tempDir, instanceID);
534
  const pdfPath = await createPDF(imagePaths, instanceID, tempDir);
@@ -549,6 +550,9 @@ async function nhentai(url) {
549
 
550
  async function downloadImageNh(image, tempDir, instanceID) {
551
  const servers = [
 
 
 
552
  "https://i5.nhentai.net",
553
  "https://i3.nhentai.net",
554
  "https://i7.nhentai.net"
 
527
  console.log(jsonData);
528
 
529
  const imgList = jsonData.images.pages.map((_, index) => ({
530
+ path: `https://i5.nhentai.net/galleries/${jsonData.media_id}/${index + 1}.${jsonData.images.pages[index].t === "w" ? "webp" : jsonData.images.pages[index].t === "p" ? "png" : "jpg"}`
531
+ }));
532
+
533
 
534
  const imagePaths = await downloadImageNhs(imgList, tempDir, instanceID);
535
  const pdfPath = await createPDF(imagePaths, instanceID, tempDir);
 
550
 
551
  async function downloadImageNh(image, tempDir, instanceID) {
552
  const servers = [
553
+ "https://i1.nhentai.net",
554
+ "https://i2.nhentai.net",
555
+ "https://i4.nhentai.net",
556
  "https://i5.nhentai.net",
557
  "https://i3.nhentai.net",
558
  "https://i7.nhentai.net"