Closed
Description
This code was working as of March 31, 2022 - Keys might expire, endpoints might move & other factors apply
update - this can be done in the content script
security policies in place
the Origin header has to either be empty or contain the string "youtube" or "google"
request information
using keys provided by tombulled/innertube
with
url: www.youtube.com/youtubei/v1/next?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8
body:
context: {
client: {
clientName: "WEB",
clientVersion: "2.20200720.00.02"
},
videoId: sponsorVideoID
response parsing
the original intention was to fetch the channelID and title from the innertube response
const ownerObj = resultData.contents.twoColumnWatchNextResults.results.results.contents[1].videoSecondaryInfoRenderer.owner.videoOwnerRenderer.title.runs[0]
const title = ownerObj.text
const channelID = ownerObj.navigationEndpoint.browseEndpoint.browseId
Metadata
Metadata
Assignees
Labels
No labels