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

Unable to download an embedded video #969

Closed
sadeqzadeh opened this issue Jun 30, 2013 · 2 comments
Closed

Unable to download an embedded video #969

sadeqzadeh opened this issue Jun 30, 2013 · 2 comments

Comments

@sadeqzadeh
Copy link

@sadeqzadeh sadeqzadeh commented Jun 30, 2013

~ $ youtube-dl --verbose http://www.youtube.com/watch?feature=player_embedded&v=yFaneKodJdg
[2] 5476
sadeqzad@Laptop ~ $ [debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', 'http://www.youtube.com/watch?feature=player_embedded']
[debug] youtube-dl version 2013.06.34.4
[debug] Python version 2.7.4 - Linux-3.8.0-19-generic-x86_64-with-LinuxMint-15-olivia
[debug] Proxy map: {}
[youtube] Setting language
[youtube] watch: Downloading video webpage
ERROR: Unable to download video webpage: HTTP Error 404: Not Found; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
File "/usr/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 416, in _real_extract
video_webpage_bytes = compat_urllib_request.urlopen(request).read()
File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 410, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 523, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 448, in error
return self._call_chain(_args)
File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(_args)
File "/usr/lib/python2.7/urllib2.py", line 531, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 404: Not Found
Traceback (most recent call last):
File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 312, in extract_info
ie_result = ie.extract(url)
File "/usr/bin/youtube-dl/youtube_dl/extractor/common.py", line 92, in extract
return self._real_extract(url)
File "/usr/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 418, in _real_extract
raise ExtractorError(u'Unable to download video webpage: %s' % compat_str(err))
ExtractorError: Unable to download video webpage: HTTP Error 404: Not Found; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output.

phihag added a commit that referenced this issue Jul 1, 2013
@phihag
Copy link
Contributor

@phihag phihag commented Jul 1, 2013

In a shell, you need to escape the ampersand. Your shell parses your command as

youtube-dl http://www.youtube.com/watch?feature=player_embedded &
v=yFaneKodJdg                   # Set a variable and do nothing

Either escape the ampersands with backslashes or put the whole URL in quotes:

$ youtube-dl "http://www.youtube.com/watch?feature=player_embedded&v=yFaneKodJdg"
[youtube] Setting language
[youtube] yFaneKodJdg: Downloading video webpage
[youtube] yFaneKodJdg: Downloading video info webpage
[youtube] yFaneKodJdg: Extracting video information
[download] Destination: Work out your English!-yFaneKodJdg.mp4

Note that this is a feature of your shell, and completely unrelated to youtube-dl. We just get the URL https://www.youtube.com/watch?feature=endscreen. I've added a warning now that summarizes this:

$ youtube-dl --verbose http://www.youtube.com/watch?feature=player_embedded&v=yFaneKodJdg
[1] 2093
$ [debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', 'http://www.youtube.com/watch?feature=player_embedded']
[debug] youtube-dl version 2013.06.34.4
[debug] Git HEAD: 53936f3
[debug] Python version 2.7.5+ - Linux-3.4-trunk-amd64-x86_64-with-debian-jessie-sid
[debug] Proxy map: {}
[youtube] Setting language
WARNING: Did you forget to quote the URL? Remember that & is a meta-character in most shells, so you want to put the URL in quotes, like  youtube-dl 'http://www.youtube.com/watch?feature=foo&v=BaW_jenozKc' (or simply  youtube-dl BaW_jenozKc  ).
...
@phihag phihag closed this Jul 1, 2013
@sadeqzadeh
Copy link
Author

@sadeqzadeh sadeqzadeh commented Jul 1, 2013

Thank you for your attention and explanations. yes, I have a very basic knowledge about Bash, I passed a course on that last year. Thank you again.

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.