Skip to content
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

Can I add HTTP proxy in python-vlc? #168

Open
Darcy-C opened this issue Feb 15, 2021 · 10 comments
Open

Can I add HTTP proxy in python-vlc? #168

Darcy-C opened this issue Feb 15, 2021 · 10 comments

Comments

@Darcy-C
Copy link

Darcy-C commented Feb 15, 2021

I found a HTTP proxy option in VLC, but I do not know how to set that in python-vlc.
Is there any docs about setting proxy?

Thank you very much.

@oaubert
Copy link
Owner

oaubert commented Feb 15, 2021

There is no proxy-related option in libvlc per se, but it should use the http_proxy environment variable if it is set. So you can import os ; os.environ['http_proxy'] = 'http://whatever/' before instanciating libvlc.

@Darcy-C
Copy link
Author

Darcy-C commented Feb 15, 2021

Thank you for your reply.
It seems like not working when adding the lines you mentioned.
(It seems like libvlc are not using python environ value)

@mrJean1
Copy link
Collaborator

mrJean1 commented Feb 15, 2021

Try setting the proxy from the command line, like

env http_proxy='http://whatever...' python vlc.py ...

Or perhaps use capitals like env HTTP_PROXY=....

@Darcy-C
Copy link
Author

Darcy-C commented Feb 15, 2021

Try setting the proxy from the command line, like

env http_proxy='http://whatever...' python vlc.py ...

Or perhaps use capitals like env HTTP_PROXY=....

Thank you for your reply.
It does not work.
I thought it would be very hard to put a proxy setting to a third party library :c

@passgall
Copy link

Try setting the proxy from the command line, like
env http_proxy='http://whatever...' python vlc.py ...
Or perhaps use capitals like env HTTP_PROXY=....

Thank you for your reply.
It does not work.
I thought it would be very hard to put a proxy setting to a third party library :c

have you resolved this problem?

@Darcy-C
Copy link
Author

Darcy-C commented May 10, 2021

Try setting the proxy from the command line, like
env http_proxy='http://whatever...' python vlc.py ...
Or perhaps use capitals like env HTTP_PROXY=....

Thank you for your reply.
It does not work.
I thought it would be very hard to put a proxy setting to a third party library :c

have you resolved this problem?

I have not resolved this. Sorry.😥

@passgall
Copy link

Try setting the proxy from the command line, like
env http_proxy='http://whatever...' python vlc.py ...
Or perhaps use capitals like env HTTP_PROXY=....

Thank you for your reply.
It does not work.
I thought it would be very hard to put a proxy setting to a third party library :c

have you resolved this problem?

I have not resolved this. Sorry.

If you have some other replace solutions? I want to view youtube videos with pyqt.I have not find other lib or tools which can embed in?Can you tell me your solution?

@Darcy-C
Copy link
Author

Darcy-C commented May 10, 2021

Try setting the proxy from the command line, like
env http_proxy='http://whatever...' python vlc.py ...
Or perhaps use capitals like env HTTP_PROXY=....

Thank you for your reply.
It does not work.
I thought it would be very hard to put a proxy setting to a third party library :c

have you resolved this problem?

I have not resolved this. Sorry.

If you have some other replace solutions? I want to view youtube videos with pyqt.I have not find other lib or tools which can embed in?Can you tell me your solution?

Yes. If you are using pyqt, QtWebEngineWidgets is an option, which is just a browser, you can use web technology directly. I think it will fit your need very well.

@passgall
Copy link

Try setting the proxy from the command line, like
env http_proxy='http://whatever...' python vlc.py ...
Or perhaps use capitals like env HTTP_PROXY=....

Thank you for your reply.
It does not work.
I thought it would be very hard to put a proxy setting to a third party library :c

have you resolved this problem?

I have not resolved this. Sorry.

If you have some other replace solutions? I want to view youtube videos with pyqt.I have not find other lib or tools which can embed in?Can you tell me your solution?

Yes. If you are using pyqt, QtWebEngineWidgets is an option, which is just a browser, you can use web technology directly. I think it will fit your need very well.

maybe python-mpv was a nice opiton! I have test it with proxy.

@vzhd1701
Copy link

vzhd1701 commented Jun 1, 2022

The only way is to use the config file. --http-proxy command line option doesn't work, maybe because it is grabbed directly from config. Works for windows only though, in other systems VLC relies on OS proxy settings.

https://gist.github.com/vzhd1701/f8f8b2ee7b83baaa85fde4e37f02e3e6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants