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

Force youtube-dl to use a certain ip address #961

Closed
vanilla38 opened this issue Jun 28, 2013 · 11 comments
Closed

Force youtube-dl to use a certain ip address #961

vanilla38 opened this issue Jun 28, 2013 · 11 comments

Comments

@vanilla38
Copy link

@vanilla38 vanilla38 commented Jun 28, 2013

Hi i want to know if it is possible to assign an interface to youtube-dl even if not by an option, maybe somewhere in the code.

I espescially need to get video information with a certain ip adress (report_video_info_webpage_download)

only thing i cant actually do is to set proxy option as the ip i want to use but it's a bit hacky.

Thanks

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Jun 29, 2013

I thinks that's a duplicate of #721

@jaimeMF jaimeMF closed this Jun 29, 2013
@vanilla38
Copy link
Author

@vanilla38 vanilla38 commented Jun 29, 2013

Not at all. All i need is to know where i can modify the code in order to make thevideo information request use a certain ip. It will not affect the downloading process only the information extractor.
Thanks

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Jun 29, 2013

It's the same, if you use a certain ip for the extraction, you can use the same ip for the download process, the user that open that issue just mention the download process, probably because that's the main use of youtube-dl or he referred to the whole extract/download process.

Also as mentioned in that issue the links extracted with YoutubeIE will only work if you download them from the same IP, you need to change the IP for the whole process, not only the extraction.

@vanilla38
Copy link
Author

@vanilla38 vanilla38 commented Jun 29, 2013

Oh okay. Thanks.

@vanilla38
Copy link
Author

@vanilla38 vanilla38 commented Jun 29, 2013

by the way, hack fix in order to use a certain IP:

replace:
import socket

by

import socket

true_socket = socket.socket
def bound_socket(_a, *_k):
sock = true_socket(_a, *_k)
sock.bind(("YOURIPADDRESS", 0))
return sock
socket.socket = bound_socket

in init.py

@Elite
Copy link

@Elite Elite commented Sep 20, 2013

@jaimeMF @phihag This feature looks interesting, I would request a --bindip feature in this original youtube-dl branch.

@ddurdle
Copy link

@ddurdle ddurdle commented Dec 30, 2014

It would be really handy to bind to a specific IP like most linux-based tools all allow you to do.

@codaman
Copy link

@codaman codaman commented Nov 19, 2015

@Elite i couldnt find any pull request that have --bindip feature

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Nov 19, 2015

@codaman you should try the --source-address option.

@codaman
Copy link

@codaman codaman commented Nov 19, 2015

"youtube-dl.exe --source-address [IP] -g [url]" this implementation not working or wrong usage. i've read all documentation but there is no info about how to use "--source-address"

@phihag
Copy link
Contributor

@phihag phihag commented Nov 19, 2015

@codaman As @dstftw told you already, we can and will not help you until you open a new issue where you describe your problem. See our bug reporting guidelines for what that description should contain. Most important is the output you get when you run youtube-dl with the -v option. For debugging --source-address, it is also highly advisable to pass in -C as well.

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
6 participants
You can’t perform that action at this time.