Skip to content

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

Closed
Theta-Dev wants to merge 1 commit intoTeamNewPipe:devfrom
Theta-Dev:fix/likes-new-viewmodel
Closed

[YouTube] fix: handle new like count viewModel#1123
Theta-Dev wants to merge 1 commit intoTeamNewPipe:devfrom
Theta-Dev:fix/likes-new-viewmodel

Conversation

@Theta-Dev
Copy link
Copy Markdown
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 or PR is related to a bug YouTube Service, https://www.youtube.com/ labels Nov 5, 2023
@AudricV
Copy link
Copy Markdown
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 or PR 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