Closed Hatsune-Mikun closed 2 years ago
Which booru is this on? I think it might be one of the boorus returning null
scores on deleted posts
For example, this one have 1 score, but library return 0 https://safebooru.org/index.php?page=post&s=view&json=1&id=3781312
But which post return null
i cannot intruduce, need to make some tests again for figure out this
Looks like some posts on safebooru just straight up return "score": null
(from https://safebooru.org/index.php?page=dapi&s=post&q=index&json=1&tags=1boy+3girls+bad_hands+breasts&limit=1&pid=1)
Your particular example post also has "score": null
in the API
I have no idea if the website is wrong, or if the API is wrong, but I think the only way for me to handle this is to just show the score as 0 (because it's impossible to determine what they mean by "null")
Understood I can understand that problem cause also like you making library for public using and parsing Anyway, shall we gonna write to booru devs about that? If is that possible to do
Sorry for delay 。゚・(>﹏<)・゚。
It looks like safebooru is running Gelbooru Beta 0.2.0
, which is out of date (Gelbooru says they're on Gelbooru Beta 0.2.5
)
I'd have to test and see if Gelbooru has it fixed (or ask them, somehow) to see if this is something safebooru can fix by updating
Please, let me know when you gonna fix it(i know, it's proble of API, so i mean, when they are gonna fix it and you'll update package) and then close this ticket Good luck, my сolleague ✊
As i can see, score is work now, so i close this ticket Idk is it your fix/update or Gelbooru API, but anyway thx for replaying!
I seen this problem in 2.5.3 ver and also in 2.5.6 ver of library Code example:
So, if we check documentation, we can see that res.score must be score of post in Number type Score even not only 0 everytime, he's also sometimes became to the null(in 2.5.3 ver, at least all time been 0) console.log screenshot Check this problem please