-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Could not parse "No Likes" in 0.21.14 #7525
Comments
Problem analysis: The video has 0 likes -> YT returns "No likes" -> We can't parse that. |
This should be an easy fix by handling that case in the method: https://github.com/TeamNewPipe/NewPipeExtractor/blob/fe432425df93d27e1abe4106cfb6ec381c71f3c1/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java#L338 For first timers: note that the change will not be done in this repo, but in the extractor: https://github.com/TeamNewPipe/NewPipeExtractor |
There are also two accessibility data which contain 0 for the number of views when they are no likes: here is the JSON part of the like button renderer for this video (tracking fields values and "toggleButtonRenderer": {
"style": {
"styleType": "STYLE_TEXT"
},
"isToggled": false,
"isDisabled": false,
"defaultIcon": {
"iconType": "LIKE"
},
"defaultText": {
"accessibility": {
"accessibilityData": {
"label": "No likes"
}
},
"simpleText": "0"
},
"toggledText": {
"accessibility": {
"accessibilityData": {
"label": "1 like"
}
},
"simpleText": "1"
},
"accessibility": {
"label": "like this video along with 0 other people"
},
"trackingParams": "",
"defaultTooltip": "I like this",
"toggledTooltip": "Unlike",
"toggledStyle": {
"styleType": "STYLE_DEFAULT_ACTIVE"
},
"defaultNavigationEndpoint": {
"clickTrackingParams": "",
"commandMetadata": {
"webCommandMetadata": {
"ignoreNavigation": true
}
},
"modalEndpoint": {}
},
"accessibilityData": {
"accessibilityData": {
"label": "like this video along with 0 other people"
}
},
"toggleButtonSupportedData": {
"toggleButtonIdData": {
"id": "TOGGLE_BUTTON_ID_TYPE_LIKE"
}
},
"targetId": "watch-like"
} If this issue is fixed by using one of the accessibility data which returns the numeric value of no likes (0), the old way to get likes and the way to get dislikes should be removed (the |
Should be fixed with TeamNewPipe/NewPipeExtractor#755 :) |
Checklist
Steps to reproduce the bug
Actual behavior
Error snackbar is triggered
Expected behavior
No error should be triggered
Log
Exception
Crash log
The text was updated successfully, but these errors were encountered: