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

[tudou] extractor throws exception #8988

Closed
kotofond opened this issue Mar 26, 2016 · 1 comment
Closed

[tudou] extractor throws exception #8988

kotofond opened this issue Mar 26, 2016 · 1 comment
Labels

Comments

@kotofond
Copy link
Contributor

@kotofond kotofond commented Mar 26, 2016

This video http://www.tudou.com/programs/view/GSsX0jAe9wo has been removed on copyright grounds and youtube-dl doesn't handle that nicely:

C:\WINDOWS\system32>youtube-dl --verbose http://www.tudou.com/programs/view/GSsX0jAe9wo
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', 'http://www.tudou.com/programs/view/GSsX0jAe9wo']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2016.03.26
[debug] Python version 3.5.1 - Windows-10-10.0.10586-SP0
[debug] exe versions: ffmpeg N-78358-g674cc26, ffprobe N-78358-g674cc26
[debug] Proxy map: {}
[tudou] GSsX0jAe9wo: Downloading JSON metadata
ERROR: An extractor error has occurred. (caused by KeyError('itemSegs',)); 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.
Traceback (most recent call last):
  File "c:\python35\lib\site-packages\youtube_dl\extractor\common.py", line 320, in extract
    return self._real_extract(url)
  File "c:\python35\lib\site-packages\youtube_dl\extractor\tudou.py", line 72, in _real_extract
    segments = self._parse_json(item_data['itemSegs'], video_id)
KeyError: 'itemSegs'
Traceback (most recent call last):
  File "c:\python35\lib\site-packages\youtube_dl\extractor\common.py", line 320, in extract
    return self._real_extract(url)
  File "c:\python35\lib\site-packages\youtube_dl\extractor\tudou.py", line 72, in _real_extract
    segments = self._parse_json(item_data['itemSegs'], video_id)
KeyError: 'itemSegs'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\python35\lib\site-packages\youtube_dl\YoutubeDL.py", line 668, in extract_info
    ie_result = ie.extract(url)
  File "c:\python35\lib\site-packages\youtube_dl\extractor\common.py", line 326, in extract
    raise ExtractorError('An extractor error has occurred.', cause=e)
youtube_dl.utils.ExtractorError: An extractor error has occurred. (caused by KeyError('itemSegs',)); 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.

I understand this is not a big deal since the video is not accessible anyway but I thought maybe youtube-dl could handle that scenario in a better way?

Thanks

@yan12125 yan12125 added the request label Mar 26, 2016
@yan12125 yan12125 closed this in 5b012df Mar 31, 2016
@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Mar 31, 2016

Proper error messages will be printed in the next version.

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.