Duolingo icon indicating copy to clipboard operation
Duolingo copied to clipboard

points_rank no longer available

Open jmares opened this issue 3 years ago • 8 comments

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.

jmares avatar Dec 05 '21 11:12 jmares

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())

golmschenk avatar Dec 05 '21 20:12 golmschenk

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.

jmares avatar Dec 05 '21 20:12 jmares

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

TsarSPb avatar Dec 10 '21 16:12 TsarSPb

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.

andreasscherbaum avatar Dec 24 '21 19:12 andreasscherbaum

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

isaacnorman82 avatar Aug 01 '22 10:08 isaacnorman82

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

Bapt5 avatar Aug 02 '22 15:08 Bapt5

Any update @Bapt5 ?

isaacnorman82 avatar Dec 13 '22 13:12 isaacnorman82

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

Is this project still active?

isaacnorman82 avatar Dec 13 '22 13:12 isaacnorman82