-
-
Notifications
You must be signed in to change notification settings - Fork 245
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
Streaming URLs failing due to PoToken experiment #724
Comments
Unfortunately no, it's more complicated than that. See #708. |
I pass a poToken and visitor data in the player API request. It has worked fine for two days now. But since few hours all extracted googlevideo urls responding with 403 error. Edit: ohhh i see now.. it expect a Edit2: After adding |
@rustynail1984 would you mind sharing your puppeteer script? |
@RatWasHere this is my puppeteer script modelled after iv-org's trusted session generator You modify this code by using the promise API to wait for the poToken to be intercepted. import puppeteer from "puppeteer";
const browser = await puppeteer.launch({
headless: false
})
// start scraping youtube!
const page = await browser.newPage()
// laymen's terms: Turn on chrome dev tools
const client = await page.createCDPSession();
await client.send('Debugger.enable');
await client.send('Debugger.setAsyncCallStackDepth', { maxDepth: 32 });
await client.send('Network.enable');
// Intercept requestWillBeSent from the dev tools
client.on("Network.requestWillBeSent", (e) => {
if(e.request.url.includes("/youtubei/v1/player")) {
const jsonData = JSON.parse(e.request.postData)
// Extractor PO Token and visitor data
console.log(`PO TOKEN: ${jsonData["serviceIntegrityDimensions"]["poToken"]}`)
console.log(`VISITOR DATA: ${jsonData["context"]["client"]["visitorData"]}`)
browser.close()
}
})
// Go to a YouTube embed
await page.goto("https://www.youtube.com/embed/jNQXAC9IVRw", {
waitUntil: "networkidle2"
})
// Start playing the video
const playButton = await page.$("#movie_player")
await playButton.click() |
@retrouser955 Do you need to be logged in for a valid PO token? |
@Elite I don't believe so. |
Hi,
i want to report that all extracted googlevideo urls using WEB Client (Encrypted and non encrypted videos) respoding with 403 error.
I guess its the nsig again.
Can someone confirm this?
Thanks.
The text was updated successfully, but these errors were encountered: