Add specs for testing item extraction

This commit is contained in:
syeopite 2021-08-11 19:29:19 -07:00
parent df1e4888cd
commit b642ae4c5d
No known key found for this signature in database
GPG key ID: 6FA616E5A5294A82
9 changed files with 1157 additions and 6 deletions

View file

@ -0,0 +1,273 @@
# The following are examples of InnerTube channelRenderers
#
# A channelRenderer renders a channel to click on within the YouTube and Invidious UI. It is **not**
# the channel page itself.
CHANNEL_RENDERER_EXAMPLES = [
# Standard channel without missing information
{"channelRenderer": {
# Channel ID
"channelId": "UCsXVk37bltHxD1rDPwtNM8Q",
# Author name. Can only be simpleText.\
"title": {
"simpleText": "Kurzgesagt In a Nutshell",
},
# Endpoint to arrive on after clicking on renderer
"navigationEndpoint": {
"clickTrackingParams": "",
"commandMetadata": {
"webCommandMetadata": {
"url": "/user/Kurzgesagt",
"webPageType": "WEB_PAGE_TYPE_CHANNEL",
"rootVe": 3611,
"apiUrl": "/youtubei/v1/browse",
},
},
"browseEndpoint": {
"browseId": "UCsXVk37bltHxD1rDPwtNM8Q",
"canonicalBaseUrl": "/user/Kurzgesagt",
},
},
# Array of thumbnails in increasing quality.
"thumbnail": {
"thumbnails": [
{
"url": "//yt3.ggpht.com/ytc/AKedOLRvMf1ZTTCnC5Wc0EGOVPyrdyvfvs20vtdTUxz_vQ=s88-c-k-c0x00ffffff-no-rj-mo",
"width": 88,
"height": 88,
},
{
"url": "//yt3.ggpht.com/ytc/AKedOLRvMf1ZTTCnC5Wc0EGOVPyrdyvfvs20vtdTUxz_vQ=s176-c-k-c0x00ffffff-no-rj-mo",
"width": 176,
"height": 176,
},
],
},
# Description snippet.
"descriptionSnippet": {
"runs": [
{
"text": "Videos explaining things with optimistic nihilism. We are a small team who want to make science look beautiful. Because it is ...",
},
],
},
# (short) Author information.
"shortBylineText": {
"runs": [
{
"text": "Kurzgesagt In a Nutshell",
"navigationEndpoint": {
"clickTrackingParams": "",
"commandMetadata": {
"webCommandMetadata": {
"url": "/user/Kurzgesagt",
"webPageType": "WEB_PAGE_TYPE_CHANNEL",
"rootVe": 3611,
"apiUrl": "/youtubei/v1/browse",
},
},
"browseEndpoint": {
"browseId": "UCsXVk37bltHxD1rDPwtNM8Q",
"canonicalBaseUrl": "/user/Kurzgesagt",
},
},
},
],
},
# Amount of (public?) videos published on the channel.
"videoCountText": {
"runs": [
{
"text": "144",
},
{
"text": " videos",
},
],
},
# Should the subscribe button be renderers as a Subscribed variant?
# "subscriptionButton": {subscribed": false},
# Amount of badges the channel has. IE verified.
"ownerBadges": [
{
"metadataBadgeRenderer": {
"icon": {
"iconType": "CHECK_CIRCLE_THICK",
},
"style": "BADGE_STYLE_TYPE_VERIFIED",
"tooltip": "Verified",
"TrackingParams": "",
"accessibilityData": {
"label": "Verified",
},
},
},
],
# Amount of subscribers the channel has, in an abbreviated format.
#
# This isn't sent by InnerTube for channels that wishes to hide it.
"subscriberCountText": {
"accessibility": {
"accessibilityData": {
"label": "15.7 million subscribers",
},
},
"simpleText": "15.7M subscribers",
},
# Subscribe button renderer. Useless for Invidious.
# "subscribeButton": {....},
# "TrackingParams": "",
# (Long) Author information.
"longBylineText": {
"runs": [
{
"text": "Kurzgesagt In a Nutshell",
"navigationEndpoint": {
"clickTrackingParams": "",
"commandMetadata": {
"webCommandMetadata": {
"url": "/user/Kurzgesagt",
"webPageType": "WEB_PAGE_TYPE_CHANNEL",
"rootVe": 3611,
"apiUrl": "/youtubei/v1/browse",
},
},
"browseEndpoint": {
"browseId": "UCsXVk37bltHxD1rDPwtNM8Q",
"canonicalBaseUrl": "/user/Kurzgesagt",
},
},
},
],
},
}}.to_json,
# See first channelRenderer for detailed explanation. Besides channel data, the only difference
# between this channelRenderer and the previous one is the lack of an "subscriberCountText"
# as it is hidden on this channel.
{"channelRenderer": {
"channelId": "UCNhX3WQEkraW3VHPyup8jkQ",
"title": {
"simpleText": "Langfocus",
},
"navigationEndpoint": {
"clickTrackingParams": "",
"commandMetadata": {
"webCommandMetadata": {
"url": "/channel/UCNhX3WQEkraW3VHPyup8jkQ",
"webPageType": "WEB_PAGE_TYPE_CHANNEL",
"rootVe": 3611,
"apiUrl": "/youtubei/v1/browse",
},
},
"browseEndpoint": {
"browseId": "UCNhX3WQEkraW3VHPyup8jkQ",
"canonicalBaseUrl": "/channel/UCNhX3WQEkraW3VHPyup8jkQ",
},
},
"thumbnail": {
"thumbnails": [
{
"url": "//yt3.ggpht.com/ytc/AKedOLRvsTYz7nlOWrGLc1GzlV96kXxY1Q9IE1KzqbXa3g=s88-c-k-c0x00ffffff-no-rj-mo",
"width": 88,
"height": 88,
},
{
"url": "//yt3.ggpht.com/ytc/AKedOLRvsTYz7nlOWrGLc1GzlV96kXxY1Q9IE1KzqbXa3g=s176-c-k-c0x00ffffff-no-rj-mo",
"width": 176,
"height": 176,
},
],
},
"descriptionSnippet": {
"runs": [
{
"text": "Sharing my passion for languages and reaching out into the wider world.",
},
],
},
"shortBylineText": {
"runs": [
{
"text": "Langfocus",
"navigationEndpoint": {
"clickTrackingParams": "",
"commandMetadata": {
"webCommandMetadata": {
"url": "/channel/UCNhX3WQEkraW3VHPyup8jkQ",
"webPageType": "WEB_PAGE_TYPE_CHANNEL",
"rootVe": 3611,
"apiUrl": "/youtubei/v1/browse",
},
},
"browseEndpoint": {
"browseId": "UCNhX3WQEkraW3VHPyup8jkQ",
"canonicalBaseUrl": "/channel/UCNhX3WQEkraW3VHPyup8jkQ",
},
},
},
],
},
"videoCountText": {
"runs": [
{
"text": "165",
},
{
"text": " videos",
},
],
},
# "subscriptionButton": {subscribed": false},
"ownerBadges": [
{
"metadataBadgeRenderer": {
"icon": {
"iconType": "CHECK_CIRCLE_THICK",
},
"style": "BADGE_STYLE_TYPE_VERIFIED",
"tooltip": "Verified",
"TrackingParams": "",
"accessibilityData": {
"label": "Verified",
},
},
},
],
# "subscribeButton": {...},
# "TrackingParams": "",
"longBylineText": {
"runs": [
{
"text": "Langfocus",
"navigationEndpoint": {
"clickTrackingParams": "",
"commandMetadata": {
"webCommandMetadata": {
"url": "/channel/UCNhX3WQEkraW3VHPyup8jkQ",
"webPageType": "WEB_PAGE_TYPE_CHANNEL",
"rootVe": 3611,
"apiUrl": "/youtubei/v1/browse",
},
},
"browseEndpoint": {
"browseId": "UCNhX3WQEkraW3VHPyup8jkQ",
"canonicalBaseUrl": "/channel/UCNhX3WQEkraW3VHPyup8jkQ",
},
},
},
],
},
}}.to_json,
]

View file

@ -0,0 +1,458 @@
# The following are examples of InnerTube playlistRenderers
#
# A playlistRenderer renders a playlist to click on within the YouTube and Invidious UI. It is **not** the playlist itself.
PLAYLIST_RENDERER_EXAMPLES = [
{"playlistRenderer": {
"playlistId": "PLFs4vir_WsTwEd-nJgVJCZPNL3HALHHpF",
"title": {
"simpleText": "The Universe and Space stuff",
},
# Array of thumbnails in increasing quality, taken from the last few videos within the playlist.
"thumbnails": [
{
"thumbnails": [
{
"url": "https://i.ytimg.com/vi/0FH9cgRhQ-k/hqdefault.jpg?sqp=-oaymwEWCKgBEF5IWvKriqkDCQgBFQAAiEIYAQ==&rs=AOn4CLD9giG-6BICfsfD6p8l0OxjPEqiPg",
"width": 168,
"height": 94,
},
{
"url": "https://i.ytimg.com/vi/0FH9cgRhQ-k/hqdefault.jpg?sqp=-oaymwEWCMQBEG5IWvKriqkDCQgBFQAAiEIYAQ==&rs=AOn4CLBJlY_7z-Jfm-lPgZvzcLsuotYD2g",
"width": 196,
"height": 110,
},
{
"url": "https://i.ytimg.com/vi/0FH9cgRhQ-k/hqdefault.jpg?sqp=-oaymwEXCPYBEIoBSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLCollsqaYxSm_va6vSN6oK8mnSFhw",
"width": 246,
"height": 138,
},
{
"url": "https://i.ytimg.com/vi/0FH9cgRhQ-k/hqdefault.jpg?sqp=-oaymwEXCNACELwBSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLDOCmzlwvvYsaaFO2u8lyWPrZULkw",
"width": 336,
"height": 188,
},
],
},
{
"thumbnails": [
{
"url": "https://i.ytimg.com/vi/G-WO-z-QuWI/default.jpg",
"width": 43,
"height": 20,
},
],
},
{
"thumbnails": [
{
"url": "https://i.ytimg.com/vi/qEfPBt9dU60/default.jpg",
"width": 43,
"height": 20,
},
],
},
{
"thumbnails": [
{
"url": "https://i.ytimg.com/vi/gLZJlf5rHVs/default.jpg",
"width": 43,
"height": 20,
},
],
},
{
"thumbnails": [
{
"url": "https://i.ytimg.com/vi/3mnSDifDSxQ/default.jpg",
"width": 43,
"height": 20,
},
],
},
],
# Amount of videos in playlist
"videoCount": "32",
# Endpoint to arrive on after clicking on renderer
"navigationEndpoint": {
"clickTrackingParams": "",
"commandMetadata": {
"webCommandMetadata": {
"url": "/watch?v=0FH9cgRhQ-k&list=PLFs4vir_WsTwEd-nJgVJCZPNL3HALHHpF",
"webPageType": "WEB_PAGE_TYPE_WATCH",
"rootVe": 3832,
},
},
"watchEndpoint": {
"videoId": "0FH9cgRhQ-k",
"playlistId": "PLFs4vir_WsTwEd-nJgVJCZPNL3HALHHpF",
"params": "OAI%3D",
# "loggingContext": {...},
# "watchEndpointSupportedOnesieConfig": {...}
},
},
# Renderer for the view full playlist link. This is stored in a
# runs object inside
# "viewPlaylistText": {...},
# (short) Author information
"shortBylineText": {
"runs": [
{
"text": "Kurzgesagt In a Nutshell",
"navigationEndpoint": {
"clickTrackingParams": "",
"commandMetadata": {
"webCommandMetadata": {
"url": "/user/Kurzgesagt",
"webPageType": "WEB_PAGE_TYPE_CHANNEL",
"rootVe": 3611,
"apiUrl": "/youtubei/v1/browse",
},
},
"browseEndpoint": {
"browseId": "UCsXVk37bltHxD1rDPwtNM8Q",
"canonicalBaseUrl": "/user/Kurzgesagt",
},
},
},
],
},
# Updated/Published date
"publishedTimeText": {
"simpleText": "Updated 7 days ago",
},
# Two or less videos from the playlist. This is used to render preview (text-only)
# next to the playlist on search results. Each content below is a mini videoRenderer
"videos": [
{
"childVideoRenderer": {
"title": {
"simpleText": "The Largest Black Hole in the Universe - Size Comparison",
},
"navigationEndpoint": {
"clickTrackingParams": "",
"commandMetadata": {
"webCommandMetadata": {
"url": "/watch?v=0FH9cgRhQ-k&list=PLFs4vir_WsTwEd-nJgVJCZPNL3HALHHpF",
"webPageType": "WEB_PAGE_TYPE_WATCH",
"rootVe": 3832,
},
},
"watchEndpoint": {
"videoId": "0FH9cgRhQ-k",
"playlistId": "PLFs4vir_WsTwEd-nJgVJCZPNL3HALHHpF",
# "loggingContext": {...},
# "watchEndpointSupportedOnesieConfig": {...}
},
},
"lengthText": {
"accessibility": {
"accessibilityData": {
"label": "13 minutes, 44 seconds",
},
},
"simpleText": "13:44",
},
"videoId": "0FH9cgRhQ-k",
},
},
{
"childVideoRenderer": {
"title": {
"simpleText": "How To Terraform Venus (Quickly)",
},
"navigationEndpoint": {
"clickTrackingParams": "",
"commandMetadata": {
"webCommandMetadata": {
"url": "/watch?v=G-WO-z-QuWI&list=PLFs4vir_WsTwEd-nJgVJCZPNL3HALHHpF",
"webPageType": "WEB_PAGE_TYPE_WATCH",
"rootVe": 3832,
},
},
"watchEndpoint": {
"videoId": "G-WO-z-QuWI",
"playlistId": "PLFs4vir_WsTwEd-nJgVJCZPNL3HALHHpF",
# "loggingContext": {...},
# "watchEndpointSupportedOnesieConfig": {...}
},
},
"lengthText": {
"accessibility": {
"accessibilityData": {
"label": "12 minutes, 48 seconds",
},
},
"simpleText": "12:48",
},
"videoId": "G-WO-z-QuWI",
},
},
],
# Amount of videos in playlist
"videoCountText": {
"runs": [
{
"text": "32",
},
{
"text": " videos",
},
],
},
# "TrackingParams": "",
# Overlay counting amount of videos in playlist
# "thumbnailText": {...},
# (Long) Author information
"longBylineText": {
"runs": [
{
"text": "Kurzgesagt In a Nutshell",
"navigationEndpoint": {
"clickTrackingParams": "",
"commandMetadata": {
"webCommandMetadata": {
"url": "/user/Kurzgesagt",
"webPageType": "WEB_PAGE_TYPE_CHANNEL",
"rootVe": 3611,
"apiUrl": "/youtubei/v1/browse",
},
},
"browseEndpoint": {
"browseId": "UCsXVk37bltHxD1rDPwtNM8Q",
"canonicalBaseUrl": "/user/Kurzgesagt",
},
},
},
],
},
# Owner badges
"ownerBadges": [
{
"metadataBadgeRenderer": {
"icon": {
"iconType": "CHECK_CIRCLE_THICK",
},
"style": "BADGE_STYLE_TYPE_VERIFIED",
"tooltip": "Verified",
"TrackingParams": "",
"accessibilityData": {
"label": "Verified",
},
},
},
],
# The actual thumbnail of the playlist
#
# YouTube allows for defining custom ones instead of just using the last video
# in the playlist. As such, that can be accessed from here.
"thumbnailRenderer": {
"playlistVideoThumbnailRenderer": {
"thumbnail": {
"thumbnails": [
{
"url": "https://i.ytimg.com/vi/0FH9cgRhQ-k/hqdefault.jpg?sqp=-oaymwEWCKgBEF5IWvKriqkDCQgBFQAAiEIYAQ==&rs=AOn4CLD9giG-6BICfsfD6p8l0OxjPEqiPg",
"width": 168,
"height": 94,
},
{
"url": "https://i.ytimg.com/vi/0FH9cgRhQ-k/hqdefault.jpg?sqp=-oaymwEWCMQBEG5IWvKriqkDCQgBFQAAiEIYAQ==&rs=AOn4CLBJlY_7z-Jfm-lPgZvzcLsuotYD2g",
"width": 196,
"height": 110,
},
{
"url": "https://i.ytimg.com/vi/0FH9cgRhQ-k/hqdefault.jpg?sqp=-oaymwEXCPYBEIoBSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLCollsqaYxSm_va6vSN6oK8mnSFhw",
"width": 246,
"height": 138,
},
{
"url": "https://i.ytimg.com/vi/0FH9cgRhQ-k/hqdefault.jpg?sqp=-oaymwEXCNACELwBSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLDOCmzlwvvYsaaFO2u8lyWPrZULkw",
"width": 336,
"height": 188,
},
],
},
},
},
# Thumbnail overlays such as the play all button or the video count.
# "thumbnailOverlays": []
}}.to_json,
# Playlists rendered on a grid has a slightly different format
#
# IE lack of author information
{"gridPlaylistRenderer": {
"playlistId": "PLFs4vir_WsTxontcYm5ctqp89cNBJKNrs",
# Playlist thumbnail in ascending quality
"thumbnail": {
"thumbnails": [
{
"url": "https://i.ytimg.com/vi/0FH9cgRhQ-k/hqdefault.jpg?sqp=-oaymwEXCOADEI4CSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLD9depPKF_lMsYL7jWnLoCVyw-0pg",
"width": 480,
"height": 270,
},
],
},
# Playlist title and endpoint it redirects to on click
"title": {
"runs": [
{
"text": "The Existential Crisis Playlist",
"navigationEndpoint": {
"clickTrackingParams": "",
"commandMetadata": {
"webCommandMetadata": {
"url": "/watch?v=0FH9cgRhQ-k&list=PLFs4vir_WsTxontcYm5ctqp89cNBJKNrs",
"webPageType": "WEB_PAGE_TYPE_WATCH",
"rootVe": 3832,
},
},
"watchEndpoint": {
"videoId": "0FH9cgRhQ-k",
"playlistId": "PLFs4vir_WsTxontcYm5ctqp89cNBJKNrs",
"params": "OAI%3D",
# "loggingContext": {...},
# "watchEndpointSupportedOnesieConfig": {...}
},
},
},
],
},
# Video count text in format
"videoCountText": {
"runs": [
{
"text": "34",
},
{
"text": " videos",
},
],
},
# Endpoint to arrive on after clicking on renderer
"navigationEndpoint": {
"clickTrackingParams": "",
"commandMetadata": {
"webCommandMetadata": {
"url": "/watch?v=0FH9cgRhQ-k&list=PLFs4vir_WsTxontcYm5ctqp89cNBJKNrs",
"webPageType": "WEB_PAGE_TYPE_WATCH",
"rootVe": 3832,
},
},
"watchEndpoint": {
"videoId": "0FH9cgRhQ-k",
"playlistId": "PLFs4vir_WsTxontcYm5ctqp89cNBJKNrs",
"params": "OAI%3D",
# "loggingContext": {...},
# "watchEndpointSupportedOnesieConfig": {...}
},
},
# Shortened video count text.
"videoCountShortText": {
"simpleText": "34",
},
# "TrackingParams": "",
# Array of thumbnails in increasing quality, taken from the last few videos within the playlist.
"sidebarThumbnails": [
{
"thumbnails": [
{
"url": "https://i.ytimg.com/vi/JXeJANDKwDc/default.jpg",
"width": 43,
"height": 20,
},
],
},
{
"thumbnails": [
{
"url": "https://i.ytimg.com/vi/Jzfpyo-q-RM/default.jpg",
"width": 43,
"height": 20,
},
],
},
{
"thumbnails": [
{
"url": "https://i.ytimg.com/vi/qEfPBt9dU60/default.jpg",
"width": 43,
"height": 20,
},
],
},
],
# Renderer for playlist size overlay on thumbnail
"thumbnailText": {
"runs": [
{
"text": "34",
"bold": true,
},
{
"text": " videos",
},
],
},
# Amount of badges the channel has. IE verified.
"ownerBadges": [
{
"metadataBadgeRenderer": {
"icon": {
"iconType": "CHECK_CIRCLE_THICK",
},
"style": "BADGE_STYLE_TYPE_VERIFIED",
"tooltip": "Verified",
"TrackingParams": "",
"accessibilityData": {
"label": "Verified",
},
},
},
],
# Playlist thumbnail in ascending quality
#
# TODO find difference between this and "thumbnail" object.
"thumbnailRenderer": {
"playlistVideoThumbnailRenderer": {
"thumbnail": {
"thumbnails": [
{
"url": "https://i.ytimg.com/vi/0FH9cgRhQ-k/hqdefault.jpg?sqp=-oaymwEXCOADEI4CSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLD9depPKF_lMsYL7jWnLoCVyw-0pg",
"width": 480,
"height": 270,
},
],
},
},
},
# Thumbnail overlays such as the play all button or the video count.
# "thumbnailOverlays": [...],
# Renderer for the view full playlist link. This is stored in a
# runs object inside
# "viewPlaylistText": {...}
}}.to_json,
]

View file

@ -0,0 +1,284 @@
# The following are examples of InnerTube videoRenderers
#
# A videoRenderer renders a video to click on within the YouTube and Invidious UI. It is **not**
# the watchable video itself.
VIDEO_RENDERER_EXAMPLES = [
{"videoRenderer" => {
# Video ID
"videoId" => "E1KkQrFEl2I",
# Array of thumbnails in increasing quality.
"thumbnail" => {
"thumbnails" => [
{
"url" => "https://i.ytimg.com/vi/E1KkQrFEl2I/hq720.jpg?sqp=-oaymwEjCOgCEMoBSFryq4qpAxUIARUAAAAAGAElAADIQj0AgKJDeAE=&rs=AOn4CLAE7cGsAxbjoQIKa04sXkfF9nTlzw",
"width" => 360,
"height" => 202,
},
{
"url" => "https://i.ytimg.com/vi/E1KkQrFEl2I/hq720.jpg?sqp=-oaymwEXCNAFEJQDSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLBnetdf_Lj9C6XpUuIVDV0mn7B2ew",
"width" => 720,
"height" => 404,
},
],
},
# Title. Can also be simpleText
"title" => {
"runs" => [
{
"text" => "How Large Can a Bacteria get? Life & Size 3",
},
],
"accessibility" => {
"accessibilityData" => {
"label" => "How Large Can a Bacteria get? Life & Size 3 by Kurzgesagt In a Nutshell 9 months ago 11 minutes, 5 seconds 7,324,534 views",
},
},
},
# (Long) Author information.
"longBylineText" => {
"runs" => [
{
"text" => "Kurzgesagt In a Nutshell",
"navigationEndpoint" => {
"clickTrackingParams" => "",
"commandMetadata" => {
"webCommandMetadata" => {
"url" => "/user/Kurzgesagt",
"webPageType" => "WEB_PAGE_TYPE_CHANNEL",
"rootVe" => 3611,
"apiUrl" => "/youtubei/v1/browse",
},
},
"browseEndpoint" => {
"browseId" => "UCsXVk37bltHxD1rDPwtNM8Q",
"canonicalBaseUrl" => "/user/Kurzgesagt",
},
},
},
],
},
# Published date
#
# For live videos (and possibly recently premiered videos) there is no published information.
# Instead, in its place is the amount of people currently watching.
"publishedTimeText" => {
"simpleText" => "9 months ago",
},
# Video Length (locale specific?)
"lengthText" => {
"accessibility" => {
"accessibilityData" => {
"label" => "11 minutes, 5 seconds",
},
},
"simpleText" => "11:05",
},
# View count (locale specific?)
#
# Typically views are stored under a "simpleText" in the "viewCountText". However, for
# livestreams and premiered it is stored under a "runs" array: [{"text" =>123}, {"text" => "watching"}]
#
# When view count is disabled the "viewCountText" is not present on InnerTube data.
"viewCountText" => {
"simpleText" => "7,324,534 views",
},
# Endpoint to arrive on after clicking on renderer
"navigationEndpoint" => {
"clickTrackingParams" => "",
"commandMetadata" => {
"webCommandMetadata" => {
"url" => "/watch?v=E1KkQrFEl2I",
"webPageType" => "WEB_PAGE_TYPE_WATCH",
"rootVe" => 3832,
},
},
"watchEndpoint" => {
"videoId" => "E1KkQrFEl2I",
"params" => "qgMKa3Vyemdlc2FndLoDCgj0juTts8vxj1S6AwoI4Lz4wObkpqh0ugMLCLOGu73S_MCcuwG6AwoI6Nmyi6a2-8ZgugMKCImerNeaqIrWdroDHhIcUkRDTVVDc1hWazM3Ymx0SHhEMXJEUHd0Tk04UboDCgji8sL8s9_j8hu6AwoIroO-kuTyidxhugMLCJSWjb7iwfS03gG6AwsIrNvJxeruqv_0AboDCwiRr7iB0-b93uEBugMKCNTbv-uz04eIEroDCwii0dvbjej74ssBugMLCNbouPHd55iEjAG6AwoIpvvOyc3pwtVCugMLCJbux5v_3NKIrgG6AwsIrJPl67y13v6QAboDCwipjcSCw9Xl6qgB8gMFDSaq1Tw%3D",
"watchEndpointSupportedOnesieConfig" => {
"html5PlaybackOnesieConfig" => {
"commonConfig" => {
"url" => "https://r1---sn-nx57ynlk.googlevideo.com/initplayback?source=youtube&orc=1&oeis=1&c=WEB&oad=3200&ovd=3200&oaad=11000&oavd=11000&ocs=700&oewis=1&oputc=1&ofpcc=1&msp=1&odeak=1&odepv=1&osfc=1&ip=198.54.131.169&id=1352a442b1449762&initcwndbps=2022500&mt=1628653969&oweuc=&pxtags=Cg4KAnR4EggyNDAyNzcwNg&rxtags=Cg4KAnR4EggyNDAyNzcwMw%2CCg4KAnR4EggyNDAyNzcwNA%2CCg4KAnR4EggyNDAyNzcwNQ%2CCg4KAnR4EggyNDAyNzcwNg",
},
},
},
},
},
# Video badges. IE Live, CC, etc
"badges" => [
{
"metadataBadgeRenderer" => {
"style" => "BADGE_STYLE_TYPE_SIMPLE",
"label" => "CC",
"trackingParams" => "",
"accessibilityData" => {
"label" => "Closed captions",
},
},
},
],
# Author badges
"ownerBadges" => [
{
"metadataBadgeRenderer" => {
"icon" => {
"iconType" => "CHECK_CIRCLE_THICK",
},
"style" => "BADGE_STYLE_TYPE_VERIFIED",
"tooltip" => "Verified",
"trackingParams" => "",
"accessibilityData" => {
"label" => "Verified",
},
},
},
],
# Author name
"ownerText" => {
"runs" => [
{
"text" => "Kurzgesagt In a Nutshell",
"navigationEndpoint" => {
"clickTrackingParams" => "",
"commandMetadata" => {
"webCommandMetadata" => {
"url" => "/user/Kurzgesagt",
"webPageType" => "WEB_PAGE_TYPE_CHANNEL",
"rootVe" => 3611,
"apiUrl" => "/youtubei/v1/browse",
},
},
"browseEndpoint" => {
"browseId" => "UCsXVk37bltHxD1rDPwtNM8Q",
"canonicalBaseUrl" => "/user/Kurzgesagt",
},
},
},
],
},
# (Long) Author information.
# TODO find difference between short and long BylineText
"shortBylineText" => {
"runs" => [
{
"text" => "Kurzgesagt In a Nutshell",
"navigationEndpoint" => {
"clickTrackingParams" => "",
"commandMetadata" => {
"webCommandMetadata" => {
"url" => "/user/Kurzgesagt",
"webPageType" => "WEB_PAGE_TYPE_CHANNEL",
"rootVe" => 3611,
"apiUrl" => "/youtubei/v1/browse",
},
},
"browseEndpoint" => {
"browseId" => "UCsXVk37bltHxD1rDPwtNM8Q",
"canonicalBaseUrl" => "/user/Kurzgesagt",
},
},
},
],
},
# "trackingParams" => "",
# "showActionMenu" => false,
"shortViewCountText" => {
"accessibility" => {
"accessibilityData" => {
"label" => "7.3 million views",
},
},
"simpleText" => "7.3M views",
},
# "menu" : {...} | renderer for 3 dot menu
# Channel pfp renderer. Also unused on Invidious
"channelThumbnailSupportedRenderers" => {
"channelThumbnailWithLinkRenderer" => {
"thumbnail" => {
"thumbnails" => [
{
"url" => "https://yt3.ggpht.com/ytc/AKedOLRvMf1ZTTCnC5Wc0EGOVPyrdyvfvs20vtdTUxz_vQ=s68-c-k-c0x00ffffff-no-rj",
"width" => 68,
"height" => 68,
},
],
},
"navigationEndpoint" => {
"clickTrackingParams" => "",
"commandMetadata" => {
"webCommandMetadata" => {
"url" => "/user/Kurzgesagt",
"webPageType" => "WEB_PAGE_TYPE_CHANNEL",
"rootVe" => 3611,
"apiUrl" => "/youtubei/v1/browse",
},
},
"browseEndpoint" => {
"browseId" => "UCsXVk37bltHxD1rDPwtNM8Q",
"canonicalBaseUrl" => "/user/Kurzgesagt",
},
},
"accessibility" => {
"accessibilityData" => {
"label" => "Go to channel",
},
},
},
},
# Provides the overlays on the thumbnails. This is currently
# used as an fallback for the "lengthText" attribute when that
# doesn't exist.
"thumbnailOverlays" => [
{
"thumbnailOverlayTimeStatusRenderer" => {
"text" => {
"accessibility" => {
"accessibilityData" => {
"label" => "11 minutes, 5 seconds",
},
},
"simpleText" => "11:05",
},
"style" => "DEFAULT",
},
},
# Renderer for watch later, add to playlist, etc overlay buttons on YouTube.
# Each separate btn has a different renderer
# {"thumbnailOverlayToggleButtonRenderer" => {...}}
# thumbnailOverlayNowPlayingRenderer: {...} | Renders "Now playing"
],
# Description snippet
"detailedMetadataSnippets" => [
{
"snippetText" => {
"runs" => [
{
"text" => "In and out, in and out. Staying alive is about doing things. This very second, your cells are combusting glucose molecules with ...",
},
],
},
"snippetHoverText" => {
"runs" => [
{
"text" => "From the video description",
},
],
},
"maxOneLine" => false,
},
],
}}.to_json,
]