H2Owater425 / node-hitomi

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

getTags with artist(and group, series, character), return blank array #49

Closed senosa closed 2 years ago

senosa commented 2 years ago

Description of bug

getTags with

const hitomi = require("node-hitomi").default;

hitomi.getTags("female", { startWith: "z" }).then((value) => {
  console.log(value); // OK, 2 tags are returned.
});

// getTags with artist(and group, series, character), return blank array.
hitomi.getTags("artist", { startWith: "z" }).then((value) => {
  console.log(value); // NG, blank array.

  // getTagUrl return valid URL: https://ltn.hitomi.la/allartists-z.html
  console.log(hitomi.getTagUrl("artist", { startWith: "z" }));
});

getTagUrl return valid URL, so I guess reason of this result is this line,

https://github.com/H2Owater425/node-hitomi/blob/cdaff690294b90cb28136c59f1c86a62527dccbf/source/index.ts#L684

but I can't read these regular expression correctly...

Expected behavior

return valid tags array.

Screenshots

screenshot-2022-05-16-163723

Environment

H2Owater425 commented 2 years ago

I just released a new release, please check it out for the package's new version. And please let me know if there's any error afterward, thank you for your contribution!

senosa commented 2 years ago

It's working as expected. Thank you for quick and perfect work!