Skip to content
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

Fix Youtube likes + disable dislikes #752

Closed
wants to merge 5 commits into from

Conversation

litetex
Copy link
Member

@litetex litetex commented Nov 17, 2021

  • I carefully read the contribution guidelines and agree to them.
  • I have tested the API against NewPipe.
  • I agree to create a pull request for NewPipe as soon as possible to make it compatible with the changed API. → No changes required, only a extractor update

This PR provides a fix for TeamNewPipe/NewPipe#7405:

  • It fixes the extraction of the likes
  • Disables extraction of dislikes
  • Fixed some related tests
  • Updated mock data

Fixes TeamNewPipe/NewPipe#7405

Preview for NewPipe:
grafik

@litetex litetex added bug Issue is related to a bug youtube service, https://www.youtube.com/ labels Nov 17, 2021
@opusforlife2
Copy link
Collaborator

Maybe the UI could be tweaked a little bit now that there is some empty space there.

@B0pol
Copy link
Member

B0pol commented Nov 19, 2021

Maybe the UI could be tweaked a little bit now that there is some empty space there.

You should open a feature request on NewPipe :) but it’s not required for this PR

@AudricV
Copy link
Member

AudricV commented Nov 19, 2021

Closing in favor of #753.

@AudricV AudricV closed this Nov 19, 2021
@litetex litetex reopened this Nov 21, 2021
@litetex
Copy link
Member Author

litetex commented Nov 21, 2021

Reopeing:

  1. The other PR doesn't have working tests
  2. The code in the other PR will be irrelevant in a few weeks. According to https://support.google.com/youtube/thread/134791097/update-to-youtube-dislike-counts YT's API will stop delivering dislike counts on 2021-12-13; That will also likely be the date the currently running A/B test will be finished an no more requests will be answered with the dislike count.

@B0pol
Copy link
Member

B0pol commented Nov 21, 2021

Reopeing:

1. The other PR doesn't have working tests

Please check logs:

org.schabi.newpipe.extractor.services.bandcamp.BandcampSearchExtractorTest$DefaultTest > testRelatedItems FAILED
1635 tests completed, 1 failed, 122 skipped

unrelated failing test is not my fault

2. The code in the other PR will be irrelevant in a few weeks. According to https://support.google.com/youtube/thread/134791097/update-to-youtube-dislike-counts YT's API will stop delivering dislike counts on 2021-12-13; That will also likely be the date the currently running A/B test will be finished an no more requests will be answered with the dislike count.

IMO we should remove it when it’s not available anymore, and display dislikes in the meantime.
That’s why I opened another PR instead of merging this one (and also because this PR is in draft, I don’t know why. Could you explain?)

@litetex
Copy link
Member Author

litetex commented Nov 21, 2021

@B0pol
Touché.

At first, this PR is a draft because YT is still A/B testing the new changes.

If I understand your PR correctly, it

  • tries to get the likes the old way style and if that fails it uses the new way
  • ties to get the dislikes the old way style and if that fails it calculates them using averageRating (which is - unexpectedly - very accurate: grafik)

If that is correct I think we should go with your PR instead.
However we should do an additional fix once the "old" ways doesn't work anymore (likely in ~1month or so).

@litetex
Copy link
Member Author

litetex commented Nov 21, 2021

Closing in favor of #753.

@litetex litetex closed this Nov 21, 2021
@litetex litetex deleted the fix-yt-dislikes branch November 30, 2021 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is related to a bug youtube service, https://www.youtube.com/
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[STOP CREATING DUPLICATES] YouTube is removing dislike count (causes snackbar error)
4 participants