-
Notifications
You must be signed in to change notification settings - Fork 216
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
get_charts is having KeyError #436
Comments
Which region are you looking at? Please specify the failing call in more detail. If it's the default region for you please figure out which one that is. |
I checked for default region as well as my region ('IN"). In both the cases there was the same issue. You could look the 'Error.txt' file that I have already dropped. |
I am also facing the same issue, |
I've the solution, I could raise a pull request. |
Yes please PR it |
I've Created a PR. You could view it. |
[1.2.1/1.1.1] get_charts is having KeyError: -
To Reproduce
Steps to reproduce the behavior:
Additional context
With some analysis I've figured out that youtube returns different response for different videos.
It appears to only occurs in 'videos' section. Not 'trending'.
**Cause
The NAVIGATION_VIDEO_ID in navigation.py is not sufficient to cover all types of responses from Youtube as the reponse of Youtube is inconsistent.
Expected structure of response:-
In some cases, the response is like: -
Possible solution
In those cases, the video ID exists somewhere else, not in 'navigationEndpoint', the navigation should be like: -
NAVIGATION_VIDEO_ID_2 = ['menu','menuRenderer','items',0,'menuServiceItemRenderer','serviceEndpoint','queueAddEndpoint','queueTarget','videoId']
Hence we could fix it by excepting the KeyError with this nav instead.
Error.txt
The text was updated successfully, but these errors were encountered: