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

teamcoco KeyError(u'type) problem #5798

Closed
selvagem opened this issue May 23, 2015 · 13 comments
Closed

teamcoco KeyError(u'type) problem #5798

selvagem opened this issue May 23, 2015 · 13 comments

Comments

@selvagem
Copy link

@selvagem selvagem commented May 23, 2015

There appears to be some issues with teamcoco and KeyError u type.

user$ youtube-dl http://teamcoco.com/video/full-episode-mon-5-18-betty-white-sex-mathematician-clio-cresswell-and-lord-huron?playlist=x;eyJ0eXBlIjoidGFnIiwiaWQiOjl9 --verbose
[Teamcoco] full-episode-mon-5-18-betty-white-sex-mathematician-clio-cresswell-and-lord-huron?playlist=x: Downloading webpage
[Teamcoco] Try to compute possible data sequence. This may take some time.
ERROR: An extractor error has occured. (caused by KeyError(u'type',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
-bash: eyJ0eXBlIjoidGFnIiwiaWQiOjl9: command not found

yan12125 added a commit that referenced this issue May 27, 2015
Some videos does not contain a 'type' field (#5798)
@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented May 28, 2015

Sorry, but the video is expired so I can't test it. Can you provide another example?
Also, remember to enclose the URL with single or double quotes. For example:

youtube-dl "http://teamcoco.com/video/full-episode-mon-5-18-betty-white-sex-mathematician-clio-cresswell-and-lord-huron?playlist=x;eyJ0eXBlIjoidGFnIiwiaWQiOjl9" --verbose
@selvagem
Copy link
Author

@selvagem selvagem commented May 28, 2015

user$ youtube-dl "http://teamcoco.com/video/full-episode-thurs-5-21-cobie-smulders-jay-larson-and-comedian-jenny-zigrino?playlist=x;eyJ0eXBlIjoidGFnIiwiaWQiOjl9" --verbose
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'http://teamcoco.com/video/full-episode-thurs-5-21-cobie-smulders-jay-larson-and-comedian-jenny-zigrino?playlist=x;eyJ0eXBlIjoidGFnIiwiaWQiOjl9', u'--verbose']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.05.20
[debug] Python version 2.7.3 - Darwin-14.3.0-x86_64-i386-64bit
[debug] exe versions: rtmpdump 2.4
[debug] Proxy map: {}
[Teamcoco] full-episode-thurs-5-21-cobie-smulders-jay-larson-and-comedian-jenny-zigrino?playlist=x;eyJ0eXBlIjoidGFnIiwiaWQiOjl9: Downloading webpage
[Teamcoco] Try to compute possible data sequence. This may take some time.
ERROR: An extractor error has occured. (caused by KeyError(u'type',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 273, in extract
return self._real_extract(url)
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/teamcoco.py", line 111, in _real_extract
if filed['type'] == 'hls':
KeyError: u'type'
Traceback (most recent call last):
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 649, in extract_info
ie_result = ie.extract(url)
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 279, in extract
raise ExtractorError('An extractor error has occured.', cause=e)
ExtractorError: An extractor error has occured. (caused by KeyError(u'type',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented May 28, 2015

Can you watch the video in browsers? I got no videos in both Safari and Chrome.

@selvagem
Copy link
Author

@selvagem selvagem commented May 28, 2015

The video only shows on browsers with a US internet connection, otherwise it just shows black.

@selvagem
Copy link
Author

@selvagem selvagem commented May 28, 2015

But the same error is shown on youtube-dl with a US connection

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented May 29, 2015

Tried a proxy in Ashburn, still no videos.

@selvagem
Copy link
Author

@selvagem selvagem commented May 29, 2015

That's strange. I used one in orlando and it was fine, although I had to refresh the browser(Safari) as it did not run the first time, sometimes it hangs up on advertisement videos.

@selvagem
Copy link
Author

@selvagem selvagem commented Jun 1, 2015

I believe that episode is off the site now, when another one becomes available I will post the verbose again.

@selvagem
Copy link
Author

@selvagem selvagem commented Jun 3, 2015

user$ youtube-dl http://teamcoco.com/video/full-episode-mon-6-1-joel-mchale-jake-tapper-and-musical-guest-courtney-barnett?playlist=x;eyJ0eXBlIjoidGFnIiwiaWQiOjl9 --verbose
[Teamcoco] full-episode-mon-6-1-joel-mchale-jake-tapper-and-musical-guest-courtney-barnett?playlist=x: Downloading webpage
[Teamcoco] Try to compute possible data sequence. This may take some time.
ERROR: An extractor error has occured. (caused by KeyError(u'type',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
-bash: eyJ0eXBlIjoidGFnIiwiaWQiOjl9: command not found

@selvagem
Copy link
Author

@selvagem selvagem commented Jun 3, 2015

Getting the same error, no change.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Jun 3, 2015

Sorry I'm not working on it anymore because I can't access the video. Need someone in US for further progress.
In version 2015.05.29 you may get a different error:

$ youtube-dl -v "http://teamcoco.com/video/full-episode-mon-6-1-joel-mchale-jake-tapper-and-musical-guest-courtney-barnett?playlist=x;eyJ0eXBlIjoidGFnIiwiaWQiOjl9"
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', 'http://teamcoco.com/video/full-episode-mon-6-1-joel-mchale-jake-tapper-and-musical-guest-courtney-barnett?playlist=x;eyJ0eXBlIjoidGFnIiwiaWQiOjl9']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.05.29
[debug] Git HEAD: eb6cb9f
[debug] Python version 3.4.3 - Linux-4.0.4-2-ARCH-x86_64-with-arch
[debug] exe versions: ffmpeg 2.6.3, ffprobe 2.6.3, rtmpdump 2.4
[debug] Proxy map: {}
[Teamcoco] full-episode-mon-6-1-joel-mchale-jake-tapper-and-musical-guest-courtney-barnett?playlist=x;eyJ0eXBlIjoidGFnIiwiaWQiOjl9: Downloading webpage
[Teamcoco] Try to compute possible data sequence. This may take some time.
[Teamcoco] 89341: Downloading m3u8 information
Traceback (most recent call last):
  File "<string>", line 7, in <module>
  File "/home/yen/Executables/Multimedia/youtube-dl/youtube_dl/__init__.py", line 405, in main
    _real_main(argv)
  File "/home/yen/Executables/Multimedia/youtube-dl/youtube_dl/__init__.py", line 395, in _real_main
    retcode = ydl.download(all_urls)
  File "/home/yen/Executables/Multimedia/youtube-dl/youtube_dl/YoutubeDL.py", line 1486, in download
    res = self.extract_info(url)
  File "/home/yen/Executables/Multimedia/youtube-dl/youtube_dl/YoutubeDL.py", line 649, in extract_info
    ie_result = ie.extract(url)
  File "/home/yen/Executables/Multimedia/youtube-dl/youtube_dl/extractor/common.py", line 273, in extract
    return self._real_extract(url)
  File "/home/yen/Executables/Multimedia/youtube-dl/youtube_dl/extractor/teamcoco.py", line 114, in _real_extract
    filed['url'], video_id, ext='mp4'))
  File "/home/yen/Executables/Multimedia/youtube-dl/youtube_dl/extractor/common.py", line 869, in _extract_m3u8_formats
    errnote='Failed to download m3u8 information')
  File "/home/yen/Executables/Multimedia/youtube-dl/youtube_dl/extractor/common.py", line 424, in _download_webpage
    res = self._download_webpage_handle(url_or_request, video_id, note, errnote, fatal, encoding=encoding)
  File "/home/yen/Executables/Multimedia/youtube-dl/youtube_dl/extractor/common.py", line 331, in _download_webpage_handle
    urlh = self._request_webpage(url_or_request, video_id, note, errnote, fatal)
  File "/home/yen/Executables/Multimedia/youtube-dl/youtube_dl/extractor/common.py", line 312, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/home/yen/Executables/Multimedia/youtube-dl/youtube_dl/YoutubeDL.py", line 1713, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python3.4/urllib/request.py", line 448, in open
    req = Request(fullurl, data)
  File "/usr/lib/python3.4/urllib/request.py", line 266, in __init__
    self.full_url = url
  File "/usr/lib/python3.4/urllib/request.py", line 292, in full_url
    self._parse()
  File "/usr/lib/python3.4/urllib/request.py", line 321, in _parse
    raise ValueError("unknown url type: %r" % self.full_url)
ValueError: unknown url type: '/secure/tve/2015-06/TBSE1004291500027614_HLS/TBSE1004291500027614_iphone_vod.m3u8

I guess it's part of a full m3u8 URL, but I don't know what the server address is. It would be great if anyone knows.

@yan12125 yan12125 closed this in d31573f Jun 5, 2015
@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Jun 5, 2015

Eventually I can watch this video on Android, and I implement the extraction logic by analyzing the Android app. In the next version of youtube-dl, this video should be downloaded correctly. Feel free to open a new issue if still any problem.
Note that you need a copy of ffmpeg or avconv to download this video.

@selvagem
Copy link
Author

@selvagem selvagem commented Jun 5, 2015

Great work Yan!

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.