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

[t.co/others?] [VimeoIE/others?] t.co link to 404'd video results in wrong error message #2711

Closed
anovicecodemonkey opened this issue Apr 6, 2014 · 2 comments

Comments

@anovicecodemonkey
Copy link

@anovicecodemonkey anovicecodemonkey commented Apr 6, 2014

The shortened URL http://t.co/x45pFUj60U leads to http://vimeo.com/90831483 which is unfortunately, a 404'd video. I noticed that youtube-dl doesn't provide the correct or at least, suitable, error message.

The shortened link:

$ youtube-dl --verbose https://t.co/x45pFUj60U
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', 'http://t.co/x45pFUj60U']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2014.04.01.3
[debug] Python version 3.4.0 - Linux-3.13.8-1-ARCH-x86_64-with-arch
[debug] Proxy map: {}
[generic] x45pFUj60U: Requesting header
WARNING: Falling back on generic information extractor.
[generic] x45pFUj60U: Downloading webpage
[generic] x45pFUj60U: Extracting information
ERROR: Unsupported URL: http://t.co/x45pFUj60U; 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. Make sure you are using the latest version; type  youtube-dl -U  to update.
Traceback (most recent call last):
  File "/usr/lib/python3.4/site-packages/youtube_dl/YoutubeDL.py", line 511, in extract_info
    ie_result = ie.extract(url)
  File "/usr/lib/python3.4/site-packages/youtube_dl/extractor/common.py", line 161, in extract
    return self._real_extract(url)
  File "/usr/lib/python3.4/site-packages/youtube_dl/extractor/generic.py", line 626, in _real_extract
    raise ExtractorError('Unsupported URL: %s' % url)
youtube_dl.utils.ExtractorError: Unsupported URL: https://t.co/x45pFUj60U; 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. Make sure you are using the latest version; type  youtube-dl -U  to update.

The 404'd vimeo URL which the shortened link leads to:

$ youtube-dl --verbose http://vimeo.com/90831483 [debug] System config: [] [debug] User config: [] [debug] Command-line args: ['--verbose', 'http://vimeo.com/90831483'] [debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2014.04.01.3 [debug] Python version 3.4.0 - Linux-3.13.8-1-ARCH-x86_64-with-arch [debug] Proxy map: {} [vimeo] 90831483: Downloading webpage ERROR: Unable to download 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. Make sure you are using the latest version; type youtube-dl -U to update. File "/usr/lib/python3.4/site-packages/youtube_dl/extractor/common.py", line 194, in _request_webpage return self._downloader.urlopen(url_or_request) File "/usr/lib/python3.4/site-packages/youtube_dl/YoutubeDL.py", line 1200, in urlopen return self._opener.open(req, timeout=self._socket_timeout) File "/usr/lib/python3.4/urllib/request.py", line 461, in open response = meth(req, response) File "/usr/lib/python3.4/urllib/request.py", line 574, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib/python3.4/urllib/request.py", line 493, in error result = self._call_chain(*args) File "/usr/lib/python3.4/urllib/request.py", line 433, in _call_chain result = func(*args) File "/usr/lib/python3.4/urllib/request.py", line 679, in http_error_302 return self.parent.open(new, timeout=req.timeout) File "/usr/lib/python3.4/urllib/request.py", line 461, in open response = meth(req, response) File "/usr/lib/python3.4/urllib/request.py", line 574, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib/python3.4/urllib/request.py", line 499, in error return self._call_chain(*args) File "/usr/lib/python3.4/urllib/request.py", line 433, in _call_chain result = func(*args) File "/usr/lib/python3.4/urllib/request.py", line 582, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp)

Even then, the error is not exactly right. The page is there, there's just no longer any video.

Not sure how this sort of situation can be easily checked for in order to provide a more useful error. Ideas?

@remitamine
Copy link
Collaborator

@remitamine remitamine commented Jul 31, 2015

now it follow the redirect. and the 404 error is a sign that the page is not found.

youtube-dl -v https://t.co/x45pFUj60U
[debug] System config: []
[debug] User config: ['--external-downloader', 'aria2c', '--external-downloader-args', '-x 16 --check-certificate=false', '-f', 'best[height<=?720]', '--sub-lang', 'ar,en', '--write-sub']
[debug] Command-line args: ['-v', 'https://t.co/x45pFUj60U']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.07.21
[debug] Python version 3.4.3 - Linux-4.1.2-2-ARCH-x86_64-with-arch-Arch-Linux
[debug] exe versions: ffmpeg 2.7.2, ffprobe 2.7.2, rtmpdump 2.4
[debug] Proxy map: {}
[generic] x45pFUj60U: Requesting header
WARNING: Falling back on generic information extractor.
[generic] x45pFUj60U: Downloading webpage
[generic] x45pFUj60U: Extracting information
[redirect] Following redirect to https://vimeo.com/90831483
[vimeo] 90831483: Downloading webpage
ERROR: Unable to download webpage: HTTP Error 404: Not Found (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
  File "/usr/lib/python3.4/site-packages/youtube_dl/extractor/common.py", line 321, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/usr/lib/python3.4/site-packages/youtube_dl/YoutubeDL.py", line 1731, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python3.4/urllib/request.py", line 469, in open
    response = meth(req, response)
  File "/usr/lib/python3.4/urllib/request.py", line 579, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.4/urllib/request.py", line 507, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.4/urllib/request.py", line 441, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.4/urllib/request.py", line 587, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Aug 7, 2015

Thanks @remitamine the behavior is correct now. The page gives 404 error code, which indicates a "Not found" error.

@yan12125 yan12125 closed this Aug 7, 2015
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
3 participants
You can’t perform that action at this time.