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

links issue #2112

Closed
shinji2009 opened this issue Jan 7, 2014 · 8 comments
Closed

links issue #2112

shinji2009 opened this issue Jan 7, 2014 · 8 comments

Comments

@shinji2009
Copy link

@shinji2009 shinji2009 commented Jan 7, 2014

Hi

just don't understand why youtube_dl CAN download video from link like this

http://someXXX.com/movies/1245355/someXXX_BLAHBLAHBLAHXXX_XXX.html

and CAN'T link like this

http://www.youtube.com/watch?feature=player_embedded&v=HkOj7labDaA

it is still have a video ID or something? after &v= ?

this link is from right klick on youtube player - "copy URL video"

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Jan 7, 2014

It's working fine, could you post the output of running youtube-dl 'http://www.youtube.com/watch?feature=player_embedded&v=HkOj7labDaA' --verbose?, like:

[debug] System config: []
[debug] User config: ['--keep-video', '--write-info-json', '--write-thumbnail', '--verbose']
[debug] Command-line args: ['http://www.youtube.com/watch?feature=player_embedded&v=HkOj7labDaA', '--verbose']
[debug] Encodings: locale 'UTF-8', fs 'utf-8', out 'UTF-8', pref: 'UTF-8'
[debug] youtube-dl version 2014.01.07.5
[debug] Git HEAD: 9c63128
[debug] Python version 2.7.6 - Darwin-13.0.0-x86_64-i386-64bit
[debug] Proxy map: {}
[youtube] Setting language
[youtube] HkOj7labDaA: Downloading webpage
@shinji2009
Copy link
Author

@shinji2009 shinji2009 commented Jan 7, 2014

like this?

D:from C\youtube>youtube-dl 'http://www.youtube.com/watch?feature=player_embed
ded&v=HkOj7labDaA' --verbose
WARNING: The url doesn't specify the protocol, trying with http
Traceback (most recent call last):
File "main.py", line 18, in
File "youtube_dl__init
_.pyo", line 740, in main
File "youtube_dl__init__.pyo", line 730, in _real_main
File "youtube_dl\YoutubeDL.pyo", line 902, in download
File "youtube_dl\YoutubeDL.pyo", line 492, in extract_info
File "youtube_dl\YoutubeDL.pyo", line 526, in process_ie_result
File "youtube_dl\YoutubeDL.pyo", line 475, in extract_info
File "youtube_dl\extractor\common.pyo", line 138, in extract
File "youtube_dl\extractor\generic.pyo", line 166, in _real_extract
File "youtube_dl\extractor\generic.pyo", line 153, in _send_head
File "urllib2.pyo", line 404, in open
File "urllib2.pyo", line 422, in _open
File "urllib2.pyo", line 382, in _call_chain
File "urllib2.pyo", line 1214, in http_open
File "urllib2.pyo", line 1184, in do_open
urllib2.URLError: <urlopen error [Errno 11001] getaddrinfo failed>
"v" не является внутренней или внешней
командой, исполняемой программой или пакетным файлом.

D:_from C\youtube>

@shinji2009
Copy link
Author

@shinji2009 shinji2009 commented Jan 7, 2014

D:_from C\youtube>youtube-dl.py 'http://www.youtube.com/watch?feature=player_em
bedded&v=HkOj7labDaA' --verbose
WARNING: The url doesn't specify the protocol, trying with http
[generic] watch?feature=player_embedded: Requesting header
Traceback (most recent call last):
File "C:\Program Files\Python 3.3.3\lib\urllib\request.py", line 1248, in do_o
pen
h.request(req.get_method(), req.selector, req.data, headers)
File "C:\Program Files\Python 3.3.3\lib\http\client.py", line 1065, in request

self._send_request(method, url, body, headers)

File "C:\Program Files\Python 3.3.3\lib\http\client.py", line 1103, in _send_r
equest
self.endheaders(body)
File "C:\Program Files\Python 3.3.3\lib\http\client.py", line 1061, in endhead
ers
self._send_output(message_body)
File "C:\Program Files\Python 3.3.3\lib\http\client.py", line 906, in _send_ou
tput
self.send(msg)
File "C:\Program Files\Python 3.3.3\lib\http\client.py", line 844, in send
self.connect()
File "C:\Program Files\Python 3.3.3\lib\http\client.py", line 822, in connect
self.timeout, self.source_address)
File "C:\Program Files\Python 3.3.3\lib\socket.py", line 417, in create_connec
tion
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
socket.gaierror: [Errno 11001] getaddrinfo failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Program Files\Python 3.3.3\lib\runpy.py", line 160, in run_module_as
main
"main", fname, loader, pkg_name)
File "C:\Program Files\Python 3.3.3\lib\runpy.py", line 73, in run_code
exec(code, run_globals)
File "D:from C\youtube\youtube-dl.py__main
.py", line 18, in
File "D:from C\youtube\youtube-dl.py\youtube_dl__init
.py", line 746, in m
ain
File "D:from C\youtube\youtube-dl.py\youtube_dl__init
.py", line 736, in _
real_main
File "D:_from C\youtube\youtube-dl.py\youtube_dl\YoutubeDL.py", line 948, in
download
File "D:_from C\youtube\youtube-dl.py\youtube_dl\YoutubeDL.py", line 506, in
extract_info
File "D:_from C\youtube\youtube-dl.py\youtube_dl\YoutubeDL.py", line 540, in
process_ie_result
File "D:_from C\youtube\youtube-dl.py\youtube_dl\YoutubeDL.py", line 489, in
extract_info
File "D:_from C\youtube\youtube-dl.py\youtube_dl\extractor\common.py", line 1
50, in extract
File "D:_from C\youtube\youtube-dl.py\youtube_dl\extractor\generic.py", line
168, in _real_extract
File "D:_from C\youtube\youtube-dl.py\youtube_dl\extractor\generic.py", line
153, in _send_head
File "C:\Program Files\Python 3.3.3\lib\urllib\request.py", line 469, in open
response = self._open(req, data)
File "C:\Program Files\Python 3.3.3\lib\urllib\request.py", line 487, in _open

'_open', req)

File "C:\Program Files\Python 3.3.3\lib\urllib\request.py", line 447, in _call
_chain
result = func(*args)
File "C:\Program Files\Python 3.3.3\lib\urllib\request.py", line 1268, in http
_open
return self.do_open(http.client.HTTPConnection, req)
File "C:\Program Files\Python 3.3.3\lib\urllib\request.py", line 1251, in do_o
pen
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 11001] getaddrinfo failed>
"v" не является внутренней или внешней
командой, исполняемой программой или пакетным файлом.

D:_from C\youtube>

@ghost
Copy link

@ghost ghost commented Jan 7, 2014

If you are on windows don't use quotes ("or') and try again...

@shinji2009
Copy link
Author

@shinji2009 shinji2009 commented Jan 7, 2014

D:_from C\youtube>youtube-dl http://www.youtube.com/watch?feature=player_embedd
ed&v=HkOj7labDaA --verbose
ERROR: Did you forget to quote the URL? Remember that & is a meta character in m
ost shells, so you want to put the URL in quotes, like youtube-dl 'http://www.y
outube.com/watch?feature=foo&v=BaW_jenozKc' (or simply youtube-dl BaW_jenozKc
).
"v" не является внутренней или внешней
командой, исполняемой программой или пакетным файлом.

D:_from C\youtube>

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Jan 7, 2014

Since the url contains a & it must be escaped, on window I think you have to use " (instead of ') to enclose it.

@shinji2009
Copy link
Author

@shinji2009 shinji2009 commented Jan 7, 2014

D:_from C\youtube>youtube-dl.py http://www.youtube.com/watch?feature=player_emb
edded&v=HkOj7labDaA --verbose
ERROR: Did you forget to quote the URL? Remember that & is a meta character in m
ost shells, so you want to put the URL in quotes, like youtube-dl 'http://www.y
outube.com/watch?feature=foo&v=BaW_jenozKc' (or simply youtube-dl BaW_jenozKc
).
"v" не является внутренней или внешней
командой, исполняемой программой или пакетным файлом.

D:_from C\youtube>

@shinji2009
Copy link
Author

@shinji2009 shinji2009 commented Jan 7, 2014

thanks! that was my bad. sorry. solved. " works

@jaimeMF jaimeMF closed this Jan 7, 2014
phihag added a commit that referenced this issue Jan 7, 2014
On Windows, double quotes are required, because single quotes get served to youtube-dl. (Yes, cmd.exe is crazy like that).
On other system, both double and single quotes are fine, unless the string contains a dollar sign (then you need single quotes).
Since virtually no URLs contain dollar signs, double quotes should do.
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.