mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-07-27 08:18:25 +00:00
Update Generate a po_token and visitor_data for inv.nadeko.net
parent
01d5423d6c
commit
57234f64b2
@ -2,6 +2,27 @@
|
||||
|
||||
# **NOTE: THIS IS A WORKAROUND ONLY FOR MY INSTANCE, DO NOT REPORT ANY ISSUES TO https://github.com/iv-org/invidious/issues IF THIS DOESN'T WORK FOR YOU!**
|
||||
|
||||
# Any OS
|
||||
|
||||
## Firefox and Chrome
|
||||
|
||||
1. Open incognito tab
|
||||
2. Create a bookmark with this url:
|
||||
```
|
||||
javascript:(function()%7Bconst%20overwriteMethod%20%3D%20(Class%2C%20name%2C%20callback)%20%3D%3E%20%7B%0A%20%20const%20orig%20%3D%20Class.prototype%5Bname%5D%3B%0A%20%20Class.prototype%5Bname%5D%20%3D%20function(...args)%20%7B%0A%20%20%20%20return%20callback(this%2Corig.bind(this)%2C...args)%3B%0A%20%20%7D%3B%0A%7D%0Aconst%20xhr_to_open_params%20%3D%20new%20WeakMap()%3B%0AoverwriteMethod(XMLHttpRequest%2C%22open%22%2C(self%2Corig%2Cmethod%2Curl%2Casync%2Cuser%2Cpassword)%3D%3E%7B%0A%20%20xhr_to_open_params.set(self%2C%7Bmethod%2Curl%2Casync%2Cuser%2Cpassword%7D)%3B%0A%20%20return%20orig(method%2Curl%2Casync%2Cuser%2Cpassword)%3B%0A%7D)%3B%0AoverwriteMethod(XMLHttpRequest%2C%22send%22%2C(self%2Corig%2Cbody)%3D%3E%7B%0A%20%20try%20%7B%0A%20%20%20%20const%20params%20%3D%20xhr_to_open_params.get(self)%3B%0A%20%20%20%20const%20data%20%3D%20JSON.parse(body)%3B%0A%20%20%20%20const%20url%20%3D%20new%20URL(params.url%2Clocation.href)%3B%0A%20%20%20%20console.log(params%2Cdata)%3B%0A%20%20%20%20if(%2F%5E%5C%2Fyoutubei%5C%2Fv1%5C%2Fplayer%2F.test(url.pathname))%20%7B%0A%20%20%20%20%20%20const%20visitor_data%20%3D%20data.context.client.visitorData%3B%0A%20%20%20%20%20%20const%20po_token%20%3D%20data.serviceIntegrityDimensions.poToken%3B%0A%20%20%20%20%20%20console.log(%7Bvisitor_data%2Cpo_token%7D)%3B%0A%20%20%20%20%20%20prompt(%22visitor_data%22%2Cvisitor_data)%3B%0A%20%20%20%20%20%20prompt(%22po_token%22%2Cpo_token)%3B%0A%20%20%20%20%7D%0A%20%20%7D%20catch(e)%20%7B%0A%20%20%20%20console.error(e)%3B%0A%20%20%7D%0A%20%20return%20orig(body)%3B%0A%7D)%3B%7D)()%3B
|
||||
```
|
||||
3. Open https://www.youtube.com/embed/jNQXAC9IVRw
|
||||
4. Click the bookmark that you created
|
||||
5. Click the button to play the video
|
||||
6. There you go, you got a `po_token` and a `visitor_data`
|
||||
|
||||
## Chrome
|
||||

|
||||
|
||||
## Firefox
|
||||

|
||||
|
||||
Thanks to the anon who shared the script. https://hastebin.skyra.pw/ivajotorub.js
|
||||
|
||||
# Linux
|
||||
|
||||
@ -20,13 +41,6 @@
|
||||
|
||||

|
||||
|
||||
# Windows
|
||||
|
||||
No idea. I don't use Windows, but if you have python installed just follow the instructions from [Tutorial without Docker](#Tutorial_without_docker)
|
||||
|
||||
# MacOS
|
||||
|
||||
Same, I don't use MacOS, but if you have python installed just follow the instructions from [Tutorial without Docker](#Tutorial_without_docker)
|
||||
|
||||
---
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user