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

How to embed socks5 proxy in python codes? #14311

Closed
hwypengsir opened this issue Sep 24, 2017 · 1 comment
Closed

How to embed socks5 proxy in python codes? #14311

hwypengsir opened this issue Sep 24, 2017 · 1 comment
Labels

Comments

@hwypengsir
Copy link

@hwypengsir hwypengsir commented Sep 24, 2017

youtube-dl --proxy socks5://127.0.0.1:1080 $link -o $dir can download video on youtube in bash shell.
With the following codes,we embedded youtube-dl in python codes.

from __future__ import unicode_literals
import youtube_dl
ydl_opts = {}
link = "some_youtube_url"
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
    ydl.download([link])

How to embed socks5 proxy in python codes?

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.