Open jodal opened 8 years ago
Agree this would be useful.
Is exposing resession_setup
what we want? I'm not actually sure if it's used internally anymore, so if there's a better interface that comes at the cost of some refactoring, I'd be happy to look into that too.
Has there been any more thought put towards this? It would be really nice to have access to the underlying requests session for mopidy-gmusic
, specifically for proxy settings.
Hey, sorry, I haven't looked at this in a while. I'd be happy to look over a PR for it, though.
Hey is this issue still active? It would be awesome to be able to use gmusicapi at school (need to specify a proxy), and messing with the internals is something I would rather not do 👍
Haha, kind of: active in the sense that it seems useful, but I don't expect to find the time for it myself.
I think you may be able to work around this by specifying setting the https_proxy
environment variable, though. Recent versions of requests will handle it without client changes, and I don't think gmusicapi does any non-requests http interactions.
It will fetch the song information, but streaming throws an error (with https_proxy)
What about if you set http_proxy
as well? Steaming probably redirects to an http url eventually.
gmusic.session
wraps a single Requests session that is used for all HTTP requests. As a gmusicapi library user, there's currently no way to get hold of the Requests session object without fiddling with gmusicapi internals. Getting hold of the Requests sessions is useful for e.g. configuring an HTTP proxy.The following is a somewhat fragile (and untested) workaround: