Can PyTube work with proxy?

Asked by Vladimir Kolev

Is it possible to make it work with proxy, if there is no other way to connect to internet?

Question information

Language:
English Edit question
Status:
Answered
For:
PyTube Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Marcos (marcosrdz) said :
#1

PyTube currently does not have a GUI for connecting to YouTube through proxy. I have never used a proxy personally, so I might be the wrong person to answer this question.
You could however (if you are a developer or know how to work files manually) edit the variable called "firststep" in /usr/share/pytube/pytube.py and modify it in order for PyTube to connect through a proxy. Maybe I am just talking nonsense :P

Revision history for this message
swierq (swierq) said :
#2

Currently PyTube uses youtube-dl which uses http_proxy variable to determine proxy location. You can set http proxy in system->preferneces, log off and in and then start pytube from terminal. It should use the proxy settings you just set. You can also try to export http_proxy in a terminal you start pytube:

export http_proxy="http://proxyhost:proxy_port"

and start pytube afterwards.
If you do not want to start pytube in a terminal every time you can try to change shortcut type form Application to Terminal Application.

Everything I have just written worked for me just fine.

Regards

Can you help with this problem?

Provide an answer of your own, or ask Vladimir Kolev for more information if necessary.

To post a message you must log in.