22

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?

Liuuil
  • 1,441
  • 3
  • 16
  • 22
  • 3
    This doesn't have anything to do with programming. Try superuser. Or reading the error message, which seems quite clear. (You want to use a proxy … to do what?) – Quentin Mar 22 '17 at 09:41
  • I thought this will set the proxy, then I can download. Do you mean I should add the url following the `...1080 ` ? – Liuuil Mar 22 '17 at 09:49

2 Answers2

50

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
1

How to download video and Playlist from youtube using youtube-dl

Step 1. Download exe file from https://github.com/ytdl-org/youtube-dl

I used the following command to download in windows 8.1

E:>youtube-dl.exe -proxy https://10.20.30.10:8080 https://www.youtube.com/playlist?list=xx

Network Options:

--proxy URL                      Use the specified HTTP/HTTPS/SOCKS proxy.
                                 To enable SOCKS proxy, specify a proper
                                 scheme. For example
                                 socks5://127.0.0.1:1080/. Pass in an empty
                                 string (--proxy "") for direct connection
--socket-timeout SECONDS         Time to wait before giving up, in seconds
--source-address IP              Client-side IP address to bind to
-4, --force-ipv4                 Make all connections via IPv4
-6, --force-ipv6                 Make all connections via IPv6
Vinod Joshi
  • 7,696
  • 1
  • 50
  • 51