thesadru / genshinstats

PLEASE USE GENSHIN.PY A python library that can get the stats of Genshin Impact players using Mihoyo's API. PLEASE USE GENSHIN.PY
https://thesadru.github.io/pdoc/genshinstats/
MIT License
267 stars 38 forks source link

set_cookies_auto() error #16

Closed jackthenewbie closed 3 years ago

jackthenewbie commented 3 years ago

image it seems like gs.set_cookies_auto() cannot find my cookies to log in (Manually do it, it worked, but i want to try something new lol), so the error went like this, any idea how to fix? thanks

jackthenewbie commented 3 years ago

oh wait sh*t, here's the the full result, my bad image

thesadru commented 3 years ago

Could you please send the output of get_browser_cookies()? I'd like to see if it's just that it cannot find the cookie rather than it not being able to log in with them.

Also hoyolab_check_in is just a utility function for hoyolab that gives you points for their community stuff, it doesn't really claim anything.

jackthenewbie commented 3 years ago

Could you please send the output of get_browser_cookies()? I'd like to see if it's just that it cannot find the cookie rather than it not being able to log in with them.

Also hoyolab_check_in is just a utility function for hoyolab that gives you points for their community stuff, it doesn't really claim anything.

Sr, I don't know what you meant by the output of get_browser_cookies(). You meant print(gs.get_browser_cookies()) ?

thesadru commented 3 years ago

Yes. You don't need to send the exact output since it has your tokens, I just need to see if it's empty or not.

jackthenewbie commented 3 years ago

Yes it return empty, was it problem on browser on my side? image

Yes. You don't need to send the exact output since it has your tokens, I just need to see if it's empty or not.

thesadru commented 3 years ago

Maybe just try logging out and back into hoyolab and see if it'd solve the issue. I tried to reproduce the bug but to no avail.

jackthenewbie commented 3 years ago

Maybe just try logging out and back into hoyolab and see if it'd solve the issue. I tried to reproduce the bug but to no avail.

no luck, what browser are you using? I'm using chrome

thesadru commented 3 years ago

I am unable to reproduce this issue. I have tested it with both chrome and firefox and both work just fine. Could you send a screenshot of the cookies you get on https://www.hoyolab.com/genshin/, it should look something like this. image

jackthenewbie commented 3 years ago

I am unable to reproduce this issue. I have tested it with both chrome and firefox and both work just fine. Could you send a screenshot of the cookies you get on https://www.hoyolab.com/genshin/, it should look something like this. image

image here, a bit difference ¯_(ツ)_/¯

thesadru commented 3 years ago

From what you've sent I can only assume it's a bug with browser-cookie3, the library that gets the cookies from your browser. My guess is that it just can't find your browser or something.

jackthenewbie commented 3 years ago

From what you've sent I can only assume it's a bug with browser-cookie3, the library that gets the cookies from your browser. My guess is that it just can't find your browser or something.

you remind me, i used pip install browser-cookie3 yesterday, since i didn't have that module so it automatically install the 0.12.1 version, what is your advice to fix this?

thesadru commented 3 years ago

No idea, since I can't reproduce the issue I can't know what caused the bug.

jackthenewbie commented 3 years ago

No idea, since I can't reproduce the issue I can't know what caused the bug.

I will manually add ltuid and ltoken then, thanks