getting API errors when using search
normalguythatlikeshentai opened this issue · 5 comments
Getting errors when seaching for stuff like 'genshin impact' and 'hololive'. Curious what would be going on. I'm getting:
{"response":{"error":"does not exist"},"url":"https://nhentai.net/api/galleries/search?query=hololive&page=1","name":"nhentaiAPIError","level":"error","timestamp":"2021-04-04T03:21:17.162Z"}
if its not the package that causes the issue, just close it out. thats fine.
thanks!
Interesting. Can you show me the code that triggers the error?
it throws errors with this basic tester.
const nhentai = require('nhentai');
const nhentaiapi = new nhentai.API();
(async () => {
result = await nhentaiapi.search('hololive');
console.log(result)
})();
I am extremely confused...
I'm getting different results that should all be the same.
- Able to reproduce what you did
- Browser and other clients need a
sessionid
cookie sent along, which is essentially a sign-in. - My tests pass. Only my tests do not need to send that cookie and still get the data. I have no idea why.
Yet even more weirder, is that only if the query has hololive
, genshin
or impact
do the above results occur.
Unfortunately I have no clue. I'll keep this open in case I find anything.
yea it was super weird. the discord bot that uses this only slipped up on a few diff searches. almost sounds like the actual nhentai api is goofing. let me know if i can be of any help. ill poke around the code tomorrow.
nhentai appears to have fixed this.