-
Notifications
You must be signed in to change notification settings - Fork 8
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
Access to all the channels of an account #4
Comments
Hello, thanks for raising this issue!
Ok this should work, the procedure is currently done in Atwy here. Maybe check if their domain is
This could not work as all of them are mixed and YouTube might interpret them in a wrong way.
Yes, you can check out Atwy, this is an App To Watch YouTube, and it uses all the features of YouTubeKit. Also make sure to activate the |
the problem seems to be login YouTube with multiple account, when log in with multiple account , these three cookie (SAPISID, __Secure-1PAPISID,__Secure-1PSID) are the same with each account, we need to add additional cookie ( __Secure-1PSIDTS ) to choose another account other than default, the account's cookie __Secure-{number}PAPISID,__Secure-{number}PSID,__Secure-{number}PSIDTS need to be added, and then choose account with header x-goog-authuser = {user_number} in my current two account setup, the value is like this: the first account is 1PSID, x-goog-authuser =0 please close your youtube website tab in the browser after copy the cookie,otherwise the __Secure-1PSIDTS cookie will change in a very short time |
Very interesting, I'm also going to check later in the morning that case and try to find an solution. What Atwy was doing in that case is just to take the first cookies if found with YouTube's domain and then process them. |
I use youtubekit to develop a player for personal use on Apple TV (to enable bilingual subtile support), I don't think there is YouTube cookie to fetch on Apple TV (webview is not allowed on Apple TV, will check it later ) |
As your project is designed for personal use you could use the private API as https://github.com/Moballo-LLC/tvOS-Browser does, its shouldn't cause any problem (I already tested on my Apple TV and it worked fine). You could also do a kind of shared keychain (like Atwy is going to do for its TV app), like you have a little app on your iPhone that will fetch the cookies and put them in a shared environnement (or even just in your clipboard and you enter the cookies string in a prompt of your iPhone's remote app). |
if I close the YouTube website in safari , the cookie seems to work for a longer time, I will try your suggestion when cookie expire too often by the way , to choose current user other than default (in multiple account scenario), additional header need to be added, please check my updated comment above |
What do you think about new methods of |
For this I just tested again and it seems to work fine, except the fact that it connects you with the first account that has been registered in the browser (and then there would be the procedure with |
sounds good, in my current two account setup: the first account is 1PSID, x-goog-authuser =0 if the order is the same in cookie and x-goog-authuser, then it should work without some additional work(auto switch account to get the account's x-good* header info, etc... )
|
no, if only the first three cookie is provided, google response with please login (in user library request), in the two account I login (one is YouTube premium, may be something is different with premium account)
|
Are __Secure-1PAPISID and __Secure-3PAPISID equals on your side? |
yes, they are the same by the way: after delete login_info cookie, it still works, so the additional cookie needed is __Secure-{number}PSIDTS |
This is weird because when compare the cookies before and after switching |
yes, __Secure-1PSIDTS and __Secure-3PSIDTS are the same too, it seems when one of the account is premium, then google need this additional cookie, regardless which account we are trying to access |
I try add these three cookie YTM.cookies = "SAPISID=(SAPISID); __Secure-1PAPISID=(PAPISID); __Secure-1PSID=(PSID1)"
or all the cookie in safari YouTube official website (host: MacBook)
also tried include some other header currently not present in the code , did it work on your end as of now ?
The text was updated successfully, but these errors were encountered: