how to use proxy on youtube-dl?

Liuuil picture Liuuil · Mar 22, 2017 · Viewed 34.9k times · Source

I wanna use the proxy and run this youtube-dl --proxy socks5://127.0.0.1:1080

this is an error below

Usage: youtube-dl [OPTIONS] URL [URL...]

youtube-dl: error: You must provide at least one URL.

what is the problem here?

Answer

anon picture anon · Mar 22, 2017

The option --proxy ... just applies to that invocation of youtube-dl. To download a video using a proxy, add the video URL to the command line, like this:

youtube-dl --proxy socks5://127.0.0.1:1080  https://youtu.be/BaW_jenozKc

If you want to use a proxy for all further invocations, create a configuration file with the contents

--proxy socks5://127.0.0.1:1080