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

Source address is not working #12360

Closed
tb3d opened this issue Mar 5, 2017 · 6 comments
Closed

Source address is not working #12360

tb3d opened this issue Mar 5, 2017 · 6 comments
Labels

Comments

@tb3d
Copy link

@tb3d tb3d commented Mar 5, 2017

Source address is not working well. How to solve it? Thanks!

Run.py part:

....

ydl_opts = {
'format': 'bestvideo/best',
'source_address': 'MY.PERSONAL.IP.ADDRESS'
'logger': MyLogger(),
'progress_hooks': [my_hook],
}
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
....


ERROR:

..4:/var/www/html/cgi-enabled/temp/youtube-dl# python run.py ERROR: Unable to download webpage: <urlopen error [Errno 99] Cannot assign reque sted address> (caused by URLError(error(99, 'Cannot assign requested address'),) )
Traceback (most recent call last):
File "run.py", line 28, in
video = ydl.extract_info('https://openload.co/embed/76iLgGro7Hw', download=F alse)
File "/var/www/html/cgi-enabled/temp/youtube-dl/youtube_dl/YoutubeDL.py", line 784, in extract_info
self.report_error(compat_str(e), e.format_traceback())
File "/var/www/html/cgi-enabled/temp/youtube-dl/youtube_dl/YoutubeDL.py", line 589, in report_error
self.trouble(error_message, tb)
File "/var/www/html/cgi-enabled/temp/youtube-dl/youtube_dl/YoutubeDL.py", line 559, in trouble
raise DownloadError(message, exc_info)
youtube_dl.utils.DownloadError: ERROR: Unable to download webpage: <urlopen erro r [Errno 99] Cannot assign requested address> (caused by URLError(error(99, 'Can not assign requested address'),))

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Mar 5, 2017

Do you have any network interface on this machine bound to MY.PERSONAL.IP.ADDRESS in the first place?
Post the output of ifconfig, ip addr show or whatever you have.

@tb3d
Copy link
Author

@tb3d tb3d commented Mar 5, 2017

It's my VPS.. and MY.PERSONAL.IP.ADDRESS is address of my computer.

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 52:54:00:00:55:72 brd ff:ff:ff:ff:ff:ff
inet 185.8.238.189/24 brd 185.8.238.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 2a02:2b88:2:1::5572:1/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::5054:ff:fe00:5572/64 scope link
valid_lft forever preferred_lft forever

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Mar 5, 2017

source_address must be an IP address bound to one of your VPS's network interfaces.

@dstftw dstftw closed this Mar 5, 2017
@dstftw dstftw added the invalid label Mar 5, 2017
@tb3d
Copy link
Author

@tb3d tb3d commented Mar 5, 2017

So, is it possible to run youtube-dl on website for each users, who wants to get video information? Because when I get video address from localhost, it works only for my IP address. I want to process it on VPS url and share this video address with another people. How to solve it?

@guanzhiyou
Copy link

@guanzhiyou guanzhiyou commented Apr 8, 2019

How to solve it?

I have the same problem, did you have solved it ?

@rainbow85213
Copy link

@rainbow85213 rainbow85213 commented Aug 27, 2019

How to solve it?

me too.

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