KartikTalwar / Duolingo

Unofficial Duolingo API Written in Python
MIT License
826 stars 128 forks source link

points_rank no longer available #112

Open jmares opened 2 years ago

jmares commented 2 years ago

Since 2021-12-04 I received error messages triggered by missing points_rank. Is it possible Duolingo changed its API?

My temporary (?) solution was to remove all references to points_rank in my code, download the duolingo.py from this repository and remove the one reference to points_rank in the function get_language_progress(self, lang).

Current code:

fields = ['streak', 'language_string', 'level_progress',
     'num_skills_learned', 'level_percent', 'level_points',
     'points_rank', 'next_level', 'level_left', 'language',
     'points', 'fluency_score', 'level']

Modified code:

fields = ['streak', 'language_string', 'level_progress',
     'num_skills_learned', 'level_percent', 'level_points',
     'next_level', 'level_left', 'language',
     'points', 'fluency_score', 'level']

As I didn't do anything with points_rank apart from storing it in a database, that was all it took to get my app up and running again.

golmschenk commented 2 years ago

I'm having a similar issue with the points_ranking_data key (likely due to the same change). Minimal example of this failing:

import time
from duolingo import Duolingo
from secret import duolingo_password, duolingo_username

duolingo = Duolingo(duolingo_username, duolingo_password)
query_results = duolingo.get_leaderboard('week', time.time())
jmares commented 2 years ago

As I am only using a couple of the functions from this package, I was wondering if it was the only change to the API. Apparently, it isn't.

TsarSPb commented 2 years ago

Yep, apparently, quite a few things got broken. get_friends() doesn't work since the 4th of Dec.

andreasscherbaum commented 2 years ago

Same problem here, also ran into the problem with get_friends(). Ignored the errors so far, and only now found time to look into this.

isaacnorman82 commented 2 years ago

Is there going to be a new release with a fix for this soon?

Bapt5 commented 2 years ago

@isaacnorman82 I will open a pull request and I hope that it will be merged.

isaacnorman82 commented 1 year ago

Any update @Bapt5 ?

isaacnorman82 commented 1 year ago

OK I raised https://github.com/KartikTalwar/Duolingo/pull/126

Is this project still active?