[GH-ISSUE #40] Add proxy configuration #32

Closed
opened 2026-02-27 22:07:39 +03:00 by kerem · 3 comments
Owner

Originally created by @OzymandiasTheGreat on GitHub (Jul 8, 2020).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/40

I've written a Mopidy extension for Youtube Music, using this library, but to be compliant with Mopidy extension guidelines I'd
have to respect global proxy config which is currently not possible.

ytmusicapi seems to use requests under the hood and Mopidy provides proxy config formatted for use with requests,
so all I'd need would be an extra __init__() param for YTMusic to pass proxy config to requests.

Originally created by @OzymandiasTheGreat on GitHub (Jul 8, 2020). Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/40 I've written a Mopidy extension for Youtube Music, using this library, but to be compliant with Mopidy extension guidelines I'd have to respect global proxy config which is currently not possible. ytmusicapi seems to use requests under the hood and Mopidy provides proxy config formatted for use with requests, so all I'd need would be an extra `__init__()` param for YTMusic to pass proxy config to requests.
kerem closed this issue 2026-02-27 22:07:39 +03:00
Author
Owner

@sigma67 commented on GitHub (Jul 8, 2020):

I have no experience with proxies and personally don't use them. However, I'm open to including an optional constructor parameter. Since I personally can't really test it, you're welcome to submit a pull request!

<!-- gh-comment-id:655602990 --> @sigma67 commented on GitHub (Jul 8, 2020): I have no experience with proxies and personally don't use them. However, I'm open to including an optional constructor parameter. Since I personally can't really test it, you're welcome to submit a pull request!
Author
Owner

@OzymandiasTheGreat commented on GitHub (Jul 8, 2020):

Will do, probably tomorrow.
I don't really have experience with proxies either, but for my use case it's not really needed.
Mopidy provides proxy object in format requests expect, so I just need to treat it as opaque object and pass it around.
As for how to make proxy object, requests have plenty of documentation for other use cases, so I don't think there needs to any documentation beyond "proxy object in requests format".

P.S. This is totally unrelated, but my extension depends on fixes made in the past 2 days that are still unreleased to pypi.
Mind sharing when you plan to release next version?

<!-- gh-comment-id:655607938 --> @OzymandiasTheGreat commented on GitHub (Jul 8, 2020): Will do, probably tomorrow. I don't really have experience with proxies either, but for my use case it's not really needed. Mopidy provides proxy object in format requests expect, so I just need to treat it as opaque object and pass it around. As for how to make proxy object, requests have plenty of documentation for other use cases, so I don't think there needs to any documentation beyond "proxy object in requests format". P.S. This is totally unrelated, but my extension depends on fixes made in the past 2 days that are still unreleased to pypi. Mind sharing when you plan to release next version?
Author
Owner

@sigma67 commented on GitHub (Jul 9, 2020):

Hey, thanks for the PR. I merged it earlier. I will publish a minor release later today or tomorrow, since I'd like to get some internationalization stuff in as well

<!-- gh-comment-id:656087373 --> @sigma67 commented on GitHub (Jul 9, 2020): Hey, thanks for the PR. I merged it earlier. I will publish a minor release later today or tomorrow, since I'd like to get some internationalization stuff in as well
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ytmusicapi#32
No description provided.