Closed thesammy2010 closed 4 years ago
Seems to work fine for me.
>>> import jikanpy
>>> api = jikanpy.Jikan(selected_base="http://localhost:8000/v3")
>>> api.user(username="TheSammy2010").keys()
dict_keys(['user_id', 'username', 'url', 'image_url', 'last_online', 'gender', 'birthday', 'location', 'joined', 'anime_stats', 'manga_stats', 'favorites', 'about', 'jikan_url', 'headers'])
I expect this you're not on the latest version of jikanpy, since this was a bug in 4.0
Make sure youre on v4.1
pip3 install -U jikanpy
Sorry my bad. I was on 4.0
It works but now I get
import jikanpy
api.user("thesammy2010")
APIException: 500 Return value of Jikan\Parser\User\Profile\AnimeStatsParser::getMeanScore() must be of the type float or null, string returned: error for username=thesammy2010, request=None
but this is an issue with Jikan which I raised here Still a little confused why we didn't get the same error though. Guess you're running a different version of Jikan
Jikanpy just makes HTTP requests to the Jikan REST API, so it depends on the version locally or the version on the servers, depending on whether you're locally hosting or not respectively.
Locally hosting via this
throws exception because it's hitting
api.jikan.moe
instead of localhost. Also confirmed from thedocker-compose
logs that no requests are made to it. Runningworks fine and returns results