Comments (14)
Note that the current implementation will obey a system-wide proxy (even on Windows).
from gmusicapi.
I'm in the middle of the move to requests, and it's surprisingly proxy-unfriendly. It looks like they're actively working on this, so hopefully it doesn't cause a roadblock.
from gmusicapi.
I think this is the issue to track: https://github.com/kennethreitz/requests/issues/905.
from gmusicapi.
Hi,
I want to capture the traffic of gmusicapi with Fiddler but can do that with current one because of proxy.
Which check-in is the last one to support system-wide proxy?
Thank you,
Kim
from gmusicapi.
Oh, sorry about that. The requests folks are slowing making progress, so hopefully this will be supported in the near future.
2013.01.05 was the last version before requests. I wouldn't expect it to work - a lot has changed since then.
If you're looking for protocol details, I've started autogenerating some docs, but the code will be most useful (the relevant section is linked in the docs). You can also intercept the webclient's traffic easily on your own.
from gmusicapi.
Thanks for detailed information.
Currently I am working on Google Music Player for Windows Store App. I referenced a Windows port version. It works but rarely I get HTTP response 403 - forbidden for "[GET] https://play.google.com/music/play?u=0&songid=". So I wanted to compare my traffic with gmusicapi to find out any difference.
from gmusicapi.
I'm not sure exactly what's causing that, but here are a couple of thoughts:
- what songs do you get 403s on? How were they uploaded? It might be something song-specific
- if after you get the 403, you continually get 403s, you might need to refresh your auth somehow
- it might also be their backend being flaky; have you ever had the same request 403 and then succeed back to back?
from gmusicapi.
•what songs do you get 403s on? How were they uploaded? It might be something song-specific
It is regular mp3 and uploaded via official Google Music Manager for Windows. 403 happens not on specific file. I get 403 for the same file which I played Ok many time before. And when I restart, it works Ok again.
•if after you get the 403, you continually get 403s, you might need to refresh your auth somehow
I implemented to re-login after 403. Even the login succeed, still I get 403. But when I just break the app on the debugger and resume in 1 min, sometimes it works with 200.
•it might also be their backend being flaky; have you ever had the same request 403 and then succeed back to back?
Once I have 403, it fails for all my songs and never succeed back to back unless I restart app or sometimes login again.
from gmusicapi.
What is the message that you get with the 403? If your auth is invalid, you'd normally get a redirect to Google's login page.
How long does it take before the first error occurs? It sounds like your auth is expiring, but that takes hours, as far as I know.
Sorry I don't have an exact answer for you; it's tough to debug other folk's code =) Here are a few ideas for things to debug:
- what does restarting the app do that logout/login in does not? Perhaps you have state hanging around in your http transport?
- maybe try to diff a back to back 200/403 - does anything change?
- you can always compare your requests against music.google.com with Fiddler
from gmusicapi.
Oh, well the error is pretty clear, isn't it? X-Rejected-Reason: ANOTHER_STREAM_BEING_PLAYED
means you can't have two clients playing streams at once.
You can see this in action if you log into music.google.com from two different places and try to play from each. I had thought I noted this in the docs, but it turns out I didn't; I'll be sure to fix that.
from gmusicapi.
Here is the failed response.
from gmusicapi.
You found it! I did not know the response contains reason other than error code. I think there are cases where I did not open 2 players but cannot sure.
One case is when I need to sign out and happened to log in again. Is there logout method available?
Anyway I have a idea how I can handle this case. Thank you so much!
from gmusicapi.
Always happy to help =)
Is there logout method available?
In my code, I just drop all the information on the current session (the auth token, various webclient cookies, and xsrf token) - ie, I don't tell the server I'm logging out.
There's definitely a serverside way to invalidate an older session, but I haven't ever looked for it (here's a relevant SO post). From what I've seen, though, if you're using multiple clients the newest one will work and the older ones won't, so it might not be necessary to tell the server.
from gmusicapi.
I'd imagine modern versions of requests support this.
from gmusicapi.
Related Issues (20)
- UnicodeEncodeError on Mobileclient.search() HOT 2
- Searching for youtube video hits and info requires a GPM subscription HOT 1
- Mobileclient remove_entries_from_playlist() always returns the input parameters HOT 5
- Gmusicapi install error HOT 10
- ValidationException for GetArtists HOT 1
- get filesize of audiofile HOT 1
- Mac address error HOT 2
- Info about a track in a playlist HOT 3
- Using dynamic oauth_filepath in Mobileclient HOT 8
- Mobileclient.get_all_songs() not returning all tracks HOT 2
- No Donation Button HOT 2
- Invalid Device id with id's returned from returned valid id's HOT 18
- gmusicapi.exceptions.CallFailure: GetStreamUrl: 403 Client Error: Forbidden for url: https://mclients.googleapis.com/music/mplay ... HOT 4
- Could not retrieve credentials from ... Simon Weber\\gmusicapi\\mobileclient.cred HOT 4
- Invalid artist and album ids on search HOT 3
- UnicodeEncodeError with logging when using Mobileclient Search HOT 1
- TypeError when running Musicmanager.get_uploaded_songs() HOT 4
- Value Error :( HOT 3
- Error while performing local test HOT 3
- Looks like Google Play Music is going away HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gmusicapi.