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

feat(parser): Update LiveChatTickerPaidStickerItem #848

Merged
merged 1 commit into from
Dec 22, 2024

Conversation

jonz94
Copy link
Contributor

@jonz94 jonz94 commented Dec 16, 2024

The LiveChatTickerPaidStickerItem class has been updated to extend YTNode instead of LiveChatTickerPaidMessageItem to better align with the latest data provided by InnerTube

Example RawNode data 1:

{
  "liveChatTickerPaidStickerItemRenderer": {
    "id": "ChwKGkNPNmI3ZW5CcUlvREZVdkV3Z1FkNlFZVDJR",
    "authorPhoto": {
      "thumbnails": [
        {
          "url": "https://yt4.ggpht.com/ytc/AIdro_lmdU1tg3poJ8X_t8MFGZpZD-7nFujvA6blC4MIv7QIOBY=s32-c-k-c0x00ffffff-no-rj",
          "width": 32,
          "height": 32
        },
        {
          "url": "https://yt4.ggpht.com/ytc/AIdro_lmdU1tg3poJ8X_t8MFGZpZD-7nFujvA6blC4MIv7QIOBY=s64-c-k-c0x00ffffff-no-rj",
          "width": 64,
          "height": 64
        }
      ],
      "accessibility": {
        "accessibilityData": {
          "label": "八神光"
        }
      }
    },
    "startBackgroundColor": 4294953512,
    "endBackgroundColor": 4294947584,
    "durationSec": 300,
    "fullDurationSec": 300,
    "showItemEndpoint": {
      "clickTrackingParams": "CAIQscgEIhMIwc_N8cGoigMV_-1MAh2NTwkk",
      "commandMetadata": {
        "webCommandMetadata": {
          "ignoreNavigation": true
        }
      },
      "showLiveChatItemEndpoint": {
        "renderer": {
          "liveChatPaidStickerRenderer": {
            /* truncated */
          }
        },
        "trackingParams": "CAMQjtEGIhMIwc_N8cGoigMV_-1MAh2NTwkk"
      }
    },
    "authorExternalChannelId": "UC2Ei_3Rrodk9ObjhDsQMVQA",
    "tickerThumbnails": [
      {
        "thumbnails": [
          {
            "url": "//lh3.googleusercontent.com/R3GMKr3HlbWPhmhZkNZ1HKOdZIMKbhC5V6pqmG-g6qaeX4Xu3_suFwHH-PnwavTjHMG5yvAmbsWi421sAw=s32-rp",
            "width": 32,
            "height": 32
          },
          {
            "url": "//lh3.googleusercontent.com/R3GMKr3HlbWPhmhZkNZ1HKOdZIMKbhC5V6pqmG-g6qaeX4Xu3_suFwHH-PnwavTjHMG5yvAmbsWi421sAw=s64-rp",
            "width": 64,
            "height": 64
          }
        ],
        "accessibility": {
          "accessibilityData": {
            "label": "Shiba Inu sticker pack"
          }
        }
      }
    ],
    "trackingParams": "CAIQscgEIhMIwc_N8cGoigMV_-1MAh2NTwkk"
  }
}

Example RawNode data 2:

{
  "liveChatTickerPaidStickerItemRenderer": {
    "id": "ChwKGkNNT0prdVNqdW9RREZhMF9yUVlkUGZZT0V3",
    "authorPhoto": {
      "thumbnails": [
        {
          "url": "https://yt4.ggpht.com/ytc/AIdro_mJMNqjr7qrkAZkFX-hXpITiaT0l-HOoLbdxucO1GX1XN4=s32-c-k-c0x00ffffff-no-rj",
          "width": 32,
          "height": 32
        },
        {
          "url": "https://yt4.ggpht.com/ytc/AIdro_mJMNqjr7qrkAZkFX-hXpITiaT0l-HOoLbdxucO1GX1XN4=s64-c-k-c0x00ffffff-no-rj",
          "width": 64,
          "height": 64
        }
      ],
      "accessibility": {
        "accessibilityData": {
          "label": "J C"
        }
      }
    },
    "startBackgroundColor": 4293467747,
    "endBackgroundColor": 4290910299,
    "durationSec": 1800,
    "fullDurationSec": 1800,
    "showItemEndpoint": {
      "clickTrackingParams": "CAYQscgEIhMIpfCv3MioigMV1fBMAh1DSiXx",
      "commandMetadata": {
        "webCommandMetadata": {
          "ignoreNavigation": true
        }
      },
      "showLiveChatItemEndpoint": {
        "renderer": {
          "liveChatPaidStickerRenderer": {
            /* truncated */
          }
        },
        "trackingParams": "CAcQjtEGIhMIpfCv3MioigMV1fBMAh1DSiXx"
      }
    },
    "authorExternalChannelId": "UCUm-iIT1Gsdm8n4iwHjb3FA",
    "tickerThumbnails": [
      {
        "thumbnails": [
          {
            "url": "//lh3.googleusercontent.com/R3GMKr3HlbWPhmhZkNZ1HKOdZIMKbhC5V6pqmG-g6qaeX4Xu3_suFwHH-PnwavTjHMG5yvAmbsWi421sAw=s32-rp",
            "width": 32,
            "height": 32
          },
          {
            "url": "//lh3.googleusercontent.com/R3GMKr3HlbWPhmhZkNZ1HKOdZIMKbhC5V6pqmG-g6qaeX4Xu3_suFwHH-PnwavTjHMG5yvAmbsWi421sAw=s64-rp",
            "width": 64,
            "height": 64
          }
        ],
        "accessibility": {
          "accessibilityData": {
            "label": "Shiba Inu sticker pack"
          }
        }
      },
      {
        "thumbnails": [
          {
            "url": "//lh3.googleusercontent.com/S6we2hZraES7JrbiYJJS85G3m9OOX0YoKAxsNRbFHOFCucIzjk29w0XpexkQYOU2yUxzQYN6W9TDyhjWS2zh=s32-rp",
            "width": 32,
            "height": 32
          },
          {
            "url": "//lh3.googleusercontent.com/S6we2hZraES7JrbiYJJS85G3m9OOX0YoKAxsNRbFHOFCucIzjk29w0XpexkQYOU2yUxzQYN6W9TDyhjWS2zh=s64-rp",
            "width": 64,
            "height": 64
          }
        ]
      }
    ],
    "trackingParams": "CAYQscgEIhMIpfCv3MioigMV1fBMAh1DSiXx"
  }
}

The `LiveChatTickerPaidStickerItem` class has been updated to extend
`YTNode` instead of `LiveChatTickerPaidMessageItem` to better align with
the latest data provided by InnerTube
@LuanRT LuanRT merged commit 5f83a74 into LuanRT:main Dec 22, 2024
4 checks passed
@jonz94 jonz94 deleted the update-LiveChatTickerPaidStickerItem branch December 23, 2024 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants