Closed KirkSuD closed 9 months ago
Heya! Thanks for reporting the issue.
404
HTTP Request error, it seems the redirect logic fix on API "server" isn't really fixing anything lol (https://animeapi.my.id/otakotaku.json
-> https://raw.githubusercontent.com/nattadasu/animeApi/v3/database/otakotaku.json_object.json
as supposed to just https://raw.githubusercontent.com/nattadasu/animeApi/v3/database/otakotaku_object.json
). I'll fix the logic when I returned to home later on following lines https://github.com/nattadasu/animeApi/blob/d127e02268d04939cdcae145adbc9d09019f5f2f/api/index.py#L215-L224.
.json
from req = self._get(f"/{platform}.json")
or req = self._get(f"/{platform}().json")
int
, while kaize
key is always str
in slug. Additionally, Kaize does not support API access for now, so information I got is limited on what I caught on the HTML. They might changed someting with HTML path, but I'm not sure if this from AniAPI issue or Kaize end.For 2nd error, can you provide what you're doing, which func, and provider you're looking for? This will help me looking up wth happened with the parser easily.
I got the 2nd error when I call one of these: api.get_list_index()
, api.get_dict_anime_relations(animeapi.Platform.MYANIMELIST)
, api.get_list_anime_relations(animeapi.Platform.MYANIMELIST)
.
They would call the converter, then use the AnimeRelation dataclass.
Alright, it seems the manual override has some dumb logic during fixing the entry (manual db: https://github.com/nattadasu/animeApi/blob/v3/database/raw/kaize_manual.json, code: https://github.com/nattadasu/animeApi/blob/d127e02268d04939cdcae145adbc9d09019f5f2f/generator/converter.py).... especially on this range https://github.com/nattadasu/animeApi/blob/d127e02268d04939cdcae145adbc9d09019f5f2f/generator/converter.py#L124-L127
whoops.
As I said earlier, I'll fix those known issue when I have time :D
So far the issues are found, and most of them on AnimeAPI main repo:
kaize_id
insteadTo make this easier to me to look up, I'll transfer this issue to main repo instead.
Hi, amazing project! This aggregates so much data from so many sources!
I got 404 when calling
api.get_list_index()
,api.get_dict_anime_relations()
,api.get_list_anime_relations()
. I found there's an extra.json
in the requested url inanimeapi.py
get_dict_anime_relations() & get_list_anime_relations().Then I got
WrongTypeError: wrong value type for field "kaize_id" - should be "typing.Union[int, NoneType]" instead of value "5-fun-de-wakaru-tate-no-yuusha-no-nariagari" of type "str"
. The problem is kaize_id is sometimes str, so it doesn't matchclass AnimeRelation:
kaize_id: Optional[int] = None
in models.py. I temporarily changed my local copy of it tokaize_id: Optional[Union[int, str]] = None
, but I'm not sure if this is correct? I didn't find the API docs of kaize.io. Can kaize_id sometimes be str? It's probably related to animeApi/generator/kaize.py & animeApi/generator/converter.py.Thank you for this amazing project.