pytube / pytube

A lightweight, dependency-free Python library (and command-line utility) for downloading YouTube Videos.
https://pytube.io
The Unlicense
12.22k stars 2.52k forks source link

How to use Proxy with pytube? #1998

Open Noahs-GitHub opened 2 months ago

Noahs-GitHub commented 2 months ago

Hi all,

I was wondering if it is possible to use pytube in combination with proxies from a site like BrightData. Do any of you have experience with this, is it possible with PyTube, what are the relevant parts of the code?

Thank you to anyone who can help!

github-actions[bot] commented 2 months ago

Thank you for contributing to PyTube. Please remember to reference Contributing.md

scj008 commented 2 months ago

proxy_handler = { "http": "http://127.0.0.1:1087",'https':'http://127.0.0.1:1087'}

youtube=YouTube(url,proxies=proxy_handler,)