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

[YouTube] fix: handle new like count viewModel #1123

Closed
wants to merge 1 commit into from

Conversation

Theta-Dev
Copy link
Contributor

YouTube introduced a new view model for the like count on video pages (next endpoint). It currently appears in less than 1% of requests but that will probably change.

The data structure looks like this (lots of fields omitted):

{
  "segmentedLikeDislikeButtonViewModel": {
    "likeButtonViewModel": {
      "likeButtonViewModel": {
        "toggleButtonViewModel": {
          "toggleButtonViewModel": {
            "defaultButtonViewModel": {
              "buttonViewModel": {
                "iconName": "LIKE",
                "title": "4.2M",
                "accessibilityText": "like this video along with 4,209,059 other people"
              }
            }
          }
        }
      }
    }
  }
}

Visitor data cookie for testing: CgtmV2MtdUFRRjJ6byib7Z6qBjIICgJERRICEgA%3D

@opusforlife2 opusforlife2 added bug Issue is related to a bug youtube service, https://www.youtube.com/ labels Nov 5, 2023
@AudricV
Copy link
Member

AudricV commented Nov 23, 2023

Closing in favor of #1127, which I wanted to open before you opened your PR.

I think my PR should fix the issue in a better way than yours, what do think?

Anyway, thank you for your pull request and your time.

@AudricV AudricV closed this Nov 23, 2023
@AudricV AudricV mentioned this pull request Nov 30, 2023
3 tasks
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.

3 participants