-
Notifications
You must be signed in to change notification settings - Fork 312
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
KeyError 'like_count' #287
Comments
Well I am not an expert in python but I realized that the error occurs when trying to get likes or dislikes in video that do not have therefore the json does not bring that key. Change in the backend_youtube_dl.py file in line 53, the assignment of keys for a get ('') and it works perfectly in the cases that does not have likes returns empty and at least does not indicate a fatal error in execution. |
#288 fixes it. |
The pafy has not had any release since 2019 Should fix download errors like KeyError 'like_count', ref mps-youtube/pafy#287
Any solution to this yet? The reason for this error might be youtube API has restructured its response. But that is not incorporated in the youtube_dl package. Whosoever is @author of PAFY package. Please look into this. |
Kind of a "band aid" solution but simply go to from self._likes = self._ydl_info['like_count']
self._dislikes = self._ydl_info['dislike_count'] to # self._likes = self._ydl_info['like_count']
# self._dislikes = self._ydl_info['dislike_count'] hopefully an actual fix will come soon enough. |
I'm get information from several videos with a loop and in some I get this error and I don't know how to fix it:
KeyError
'like_count'
The text was updated successfully, but these errors were encountered: