-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
myShows is broken #5
Comments
Seems to be a duplicate of #3 which was never fixed. The workaround still works, but we should either fix the broken |
Yes i never had time to reverse engineer their new way of retrieving data in the app. Pull requests are well appreciated :D |
How would I go about reverse engineering? The website does not use the API as far as I can tell. The first time I heard about this API was actually through this Python package. Is there an application using that API? |
I created this package by reverse engineering the TVTime App for android https://play.google.com/store/apps/details?id=com.tozelabs.tvshowtime The problem is that when they added support for movie tracking, they created a new API gateway that doesn't use HTTP Basic auth but JWT login, i handled to get the routes that have the data about the movies and the profile data with tv shows list and everything but got stuck at creating a JWT token that can be accepted by the backend since i'd have to implement a way to use the refresh token to keep the session alive like the app does |
Okay, interesting. So implementing the JWT refresh logic would probably mean a rewrite |
Not necessarily, from what i've seen the token that gets sent at login expires after like 5 days but after that you'd have to refresh it to keep the requests going, so if someone had implemented an automated system that keeps the script going instead of single time runs, it would break. |
Do you still remember what the API routes were and where to get the |
Okay after a bit of research I found the following: Exemplary requests: curl --request GET 'https://api2.tozelabs.com/v2/signin?username=<USERNAME>&password=<PASSWORD>' To then get statistics about series watched: curl --request GET 'https://api2.tozelabs.com/v2/user/<USERID>/statistics?stat_type=watched&viewer_id=<USERID>' \
--header 'Authorization: Bearer <tvst_access_token>' Edit: actually seems like it even works without the API key. |
Some of those APIs dont even need auth from what i recall.
The thing now is, either i rewrite everything with the bearer implementation and drop the basic auth method or add support in a non breaking way to the bearer one with a second session internally managed but still have to decide if to implement a refresh of the jwt token |
You could also let the user handle the refreshing of the token by exposing a refresh() function and exceptions that trigger if the token needs to be refreshed. I just found this repo https://github.com/TheIndra55/tvtime-api/ which documents more of the api2/v2 routes. |
Seems like the API route
https://api2.tozelabs.com/v2/my_shows
does not work anymore:The text was updated successfully, but these errors were encountered: