H2Owater425 / node-hitomi

Hitomi.la api for Node.js
https://npm.im/node-hitomi
MIT License
15 stars 2 forks source link

Make method to get image url flexible #36

Closed H2Owater425 closed 2 years ago

H2Owater425 commented 2 years ago

Currently, the getImageUrl function uses hard-coded image resolving data to resolve an image URL and this produces the wrong URL when Hitomi changes its image resolving data. You can solve this problem just by fetching the data whenever the function is called, although it costs a lot. So, I suggest making a class that can obtain and store the data out of necessity. In that way, users can get proper URLs at a low cost even if Hitomi changes their method to get the URLs.