Zekfad / nhentai-api

Node.JS client for nhentai.net undocumented API.
https://zekfad.github.io/nhentai-api/
ISC License
42 stars 6 forks source link

Missing GIF ImageType #10

Closed Tiffceet closed 2 years ago

Tiffceet commented 3 years ago

There are some doujins that uses .gif instead of .png / .jpg

This causes issue to getImageUrl(), it will return the wrong url because the image type is undefined

`const { API, } = require('nhentai-api'); const api = new API();

api.getBook(350866).then(book => { console.log(api.getImageURL(book.cover)); // https://t.nhentai.net/galleries/1864957/cover.undefined console.log(api.getImageURL(book.pages[1])); // https://i.nhentai.net/galleries/1864957/2.undefined });`

Suggesting to add GIF ImageType

Zekfad commented 3 years ago

>gif hentai doujin

image

Zekfad commented 3 years ago

I've just added dev version artifacts to the releases. So if you're ok with using dev version you install it (instructions provided).

Zekfad commented 3 years ago

Just published dev tag to npm. You can now use yarn add nhentai-api@dev.

Zekfad commented 2 years ago

Also added legacy tag, with GIF support.