Skip to content
This repository has been archived by the owner on Aug 1, 2021. It is now read-only.

There is no 'locale' key in 'track' dictionary now #347

Closed
pavelicii opened this issue Mar 21, 2019 · 5 comments
Closed

There is no 'locale' key in 'track' dictionary now #347

pavelicii opened this issue Mar 21, 2019 · 5 comments

Comments

@pavelicii
Copy link
Contributor

pavelicii commented Mar 21, 2019

Today I faced this issue while trying to download a course. Seems like their API was changed and now you have to retrieve the language into lang variable differently.

I was able to fix it by changing this:

lang = track.get('language') or track.get('srclang') or track.get('label') or track['locale'].get('locale').split('_')[0]

To:

lang = track.get('language') or track.get('srclang') or track.get('label') or track['locale_id'].split('_')[0]

Debug screenshot:
Screenshot_1

@downysoftware
Copy link

Tried this. Can confirm it fixed my issue as well. Thanks.

@jck4422
Copy link

jck4422 commented Mar 22, 2019

Worked for me. great. THX!

@1l6r5d
Copy link

1l6r5d commented Mar 22, 2019

same, worked for me. good job with THX!

@Eugenio-Liso
Copy link

Completely fixes the problem, thank you!

@prateekdaniels
Copy link

Thank you !! awesome fix @pavelnazimok

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants