-
Notifications
You must be signed in to change notification settings - Fork 766
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update the user agent for the chrome signin trick
- Loading branch information
1 parent
4b64f7a
commit 3f36c34
Showing
2 changed files
with
3 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3f36c34
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this user agent is incorrect, which is why YTM is failing to load. The official Chromium UA has both Chromium and Chrome in it, and you are using a version (80) that is only in dev, so may not be supported yet.
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/78.0.3904.108 Chrome/78.0.3904.108 Safari/537.36
It also looks like you may have transposed numbers for the version, there is no 80.0.3904.70, but there is a 78.0.3904.108.
3f36c34
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As @jostrander said, switching to YTM says that the library couldn't be optimized however, at least for Ubuntu 18.04, I'm able to log in and access GPM with this UA
3f36c34
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jostrander I'm deliberately hand crafting this UA. Putting "Chrome" in the UA triggers the sign in check. Need to find a way to put "Chrome" in the UA only after you're signed in
3f36c34
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could change the UA on the fly based on the URL?
https://accounts.google.com/
vs
https://play.google.com
vs
https://music.google.com
3f36c34
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think by the time we know the URL it might be too late for the UA to change / be updated. Can check tonight though
3f36c34
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed my Firefox UA works (can both login and listen to music on YTM and GPM)
3f36c34
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Max9403 You're a hero, that's the golden User Agent. Would have take a while for me to start trying Gecko UA's.
Initial tests show that that work, I'll push it up to master and drop some builds for other folks to test. Thanks for sharing 🙇