Closed untergrundbiber closed 10 years ago
Does it work without the proxy?
Yes, without proxy i have no problems.
Can you try prepending the proxy address with http://
. Also can you try separating it into two strings, --proxy
and http://127.0.0.1:8000/
I would really like to test but with the new version 1.5.9 I also have a new problem. This error occurs regardless of whether with or without proxy.
/root/ytdl_nodejs/node_modules/youtube-dl/lib/youtube-dl.js:109
if (!options.nosubs && isNoSubsRegex.test(stderr)) {
^
TypeError: Cannot read property 'nosubs' of undefined
at /root/ytdl_nodejs/node_modules/youtube-dl/lib/youtube-dl.js:109:19
at ChildProcess.exithandler (child_process.js:635:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Process.ChildProcess._handle.onexit (child_process.js:810:5)
Sorry about that, should be good now.
Sorry, next error :( I only install youtube-dl over npm, without any changes and execute your example-script.
~/ytjs/node_modules/youtube-dl/example # node download.js
events.js:72
throw er; // Unhandled 'error' event
^
Error: : video doesn't have subtitles
WARNING: video doesn't have subtitles
at /root/ytjs/node_modules/youtube-dl/lib/youtube-dl.js:125:23
at ChildProcess.exithandler (child_process.js:635:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Process.ChildProcess._handle.onexit (child_process.js:810:5)
Are you running the exact file in the example dir? I just ran it and it downloaded fine.
Yes, install with "npm install youtube-dl" and run it in the example-dir
I just did that, same result.
Ahh i'm so sorry, i forgot that i have a regular installed youtube-dl with a config (/etc/youtube-dl.conf) that download all subs. Sorry! I tested it now on another machine with fresh youtube-dl and it works. :+1:
And now the tests with proxy: I used the example download.js and change the the video-variable.
var video = ytdl('http://www.youtube.com/watch?v=Lle-q-0SL_c',['--proxy=http://127.0.0.1:8000/']);
events.js:72
throw er; // Unhandled 'error' event
^
Error: status code 403
at Request.<anonymous> (/home/synctube/ytjs/node_modules/youtube-dl/lib/youtube-dl.js:51:30)
at Request.EventEmitter.emit (events.js:95:17)
at Request.onResponse (/home/synctube/ytjs/node_modules/youtube-dl/node_modules/request/request.js:958:10)
at ClientRequest.g (events.js:180:16)
at ClientRequest.EventEmitter.emit (events.js:95:17)
at HTTPParser.parserOnIncomingClient [as onIncoming] (http.js:1688:21)
at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:121:23)
at CleartextStream.socketOnData [as ondata] (http.js:1583:20)
at CleartextStream.read [as _read] (tls.js:511:12)
at CleartextStream.Readable.read (_stream_readable.js:320:10)
and without equal sign: var video = ytdl('http://www.youtube.com/watch?v=Lle-q-0SL_c',['--proxy http://127.0.0.1:8000/']);
events.js:72
throw er; // Unhandled 'error' event
^
Error: Command failed: Usage: youtube-dl [options] url [url...]
youtube-dl: error: no such option: --proxy http://127.0.0.1:8000/
at ChildProcess.exithandler (child_process.js:637:15)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Process.ChildProcess._handle.onexit (child_process.js:810:5)
Hmm, I'm not sure how I can test this myself. Is there a proxy service somewhere I can use to test?
Yes, you can use one of these proxies: http://proxylist.hidemyass.com/#listable
or you use Tinyproxy and make your own local proxy, i think it makes no difference https://banu.com/tinyproxy/
Ok. I just tried it by separating the option into two strings and it worked. Try this
var video = ytdl('http://www.youtube.com/watch?v=Lle-q-0SL_c',['--proxy', 'http://127.0.0.1:8000/']);
Wow, that works! Thank you so much! :+1: :+1: :+1:
np.
Hi there
I work on a script to download YT videos, that are blocked in my country, over an ssh-tunnled proxy. I tried your example download script with the option "--proxy=127.0.0.1:8000", but it throws an error:
When i call youtube-dl from the console it works flawless. "youtube-dl --proxy http://127.0.0.1:8000/ https://www.youtube.com/watch?v=Lle-q-0SL_c"
Would it be possible to implant proxy support?
Greetings