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 doesn't work #7573

Closed
codaman opened this issue Nov 20, 2015 · 4 comments
Closed

--source-address doesn't work #7573

codaman opened this issue Nov 20, 2015 · 4 comments

Comments

@codaman
Copy link

@codaman codaman commented Nov 20, 2015

i tried this

youtube-dl --source-address 195.46.137.11 -g https://www.youtube.com/watch?v=R-qlQe8R2Cs

i'm getting this error

ERROR: Unable to download webpage: (caused by URLError(error(49, "Can't assign requested address"),))

@phihag
Copy link
Contributor

@phihag phihag commented Nov 20, 2015

Can you post the entire output you get when you run youtube-dl --source-address 195.46.137.11 -Cv R-qlQe8R2Cs? The first line should be something along the lines of [debug] System config: []. That output tells us what lead to the error message.

Also of interest is which IP addresses you have assigned on your local machine. Please post the output of ipconfig if you are using Windows and ip a otherwise.

@codaman
Copy link
Author

@codaman codaman commented Nov 20, 2015

---output of debug--

[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'--source-address', u'195.46.137.11', u'-Cv', u'R-qlQe8R2Cs']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.11.19
[debug] Python version 2.7.10 - Darwin-15.0.0-x86_64-i386-64bit
[debug] exe versions: none
[debug] Proxy map: {}
Traceback (most recent call last):
File "/Users/developer/miniconda2/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/Users/developer/miniconda2/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/local/bin/youtube-dl/main.py", line 19, in
File "/usr/local/bin/youtube-dl/youtube_dl/init.py", line 410, in main
File "/usr/local/bin/youtube-dl/youtube_dl/init.py", line 377, in _real_main
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 341, in init
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1930, in print_debug_header
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1873, in urlopen
File "/Users/developer/miniconda2/lib/python2.7/urllib2.py", line 431, in open
response = self._open(req, data)
File "/Users/developer/miniconda2/lib/python2.7/urllib2.py", line 449, in _open
'_open', req)
File "/Users/developer/miniconda2/lib/python2.7/urllib2.py", line 409, in _call_chain
result = func(*args)
File "/usr/local/bin/youtube-dl/youtube_dl/utils.py", line 798, in https_open
File "/Users/developer/miniconda2/lib/python2.7/urllib2.py", line 1197, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error [Errno 49] Can't assign requested address>

This is output of ipconfig

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
options=3<RXCSUM,TXCSUM>
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
nd6 options=1
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 14:10:9f:da:f0:ad
inet6 fe80::1610:9fff:feda:f0ad%en0 prefixlen 64 scopeid 0x4
inet 192.168.12.68 netmask 0xfffffc00 broadcast 192.168.15.255
nd6 options=1
media: autoselect
status: active
en1: flags=963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX> mtu 1500
options=60<TSO4,TSO6>
ether 32:00:11:c3:82:80
media: autoselect
status: inactive
en2: flags=963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX> mtu 1500
options=60<TSO4,TSO6>
ether 32:00:11:c3:82:81
media: autoselect
status: inactive
p2p0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 2304
ether 06:10:9f:da:f0:ad
media: autoselect
status: inactive
awdl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1484
ether 02:67:42:a0:1b:0a
inet6 fe80::67:42ff:fea0:1b0a%awdl0 prefixlen 64 scopeid 0x8
nd6 options=1
media: autoselect
status: active
bridge0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=63<RXCSUM,TXCSUM,TSO4,TSO6>
ether 16:10:9f:ad:a2:00
Configuration:
id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
ipfilter disabled flags 0x2
member: en1 flags=3<LEARNING,DISCOVER>
ifmaxaddr 0 port 5 priority 0 path cost 0
member: en2 flags=3<LEARNING,DISCOVER>
ifmaxaddr 0 port 6 priority 0 path cost 0
nd6 options=1
media:
status: inactive

@phihag
Copy link
Contributor

@phihag phihag commented Nov 20, 2015

As reported by ipconfig, your machine's IP address is not 195.46.137.11, but 192.168.12.68. The operating system prevents you from binding to an IP address that you have not configured. Before binding, you must configure this machine to have the IP address 195.46.137.11. If you want to send and receive, you must also configure routing and firewalls in your network.

@phihag phihag closed this Nov 20, 2015
@codaman
Copy link
Author

@codaman codaman commented Nov 20, 2015

i tried to setup a web service that send clients extracted urls. may be it is impossible, network doesnt allow bind another ip

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.