Package: nicovideo-dl Version: 0.0.20120212-1 Severity: grave Dear Maintainer, nicovideo-dl does not work at all because of Bug #678035 "python2.7: urllib2 doesn't connect to some HTTPS sites".
Workaround from http://bugs.python.org/issue11220 can fix this problem. --- /usr/bin/nicovideo-dl 2012-06-26 00:43:34.000000000 +0900 +++ nicovideo-dl 2013-05-17 20:08:10.635010732 +0900 @@ -45,6 +45,28 @@ import codecs import xml.parsers.expat + +# custom HTTPS opener, banner's oracle 10g server supports SSLv3 only +import httplib, ssl, urllib2, socket +class HTTPSConnectionV3(httplib.HTTPSConnection): + def __init__(self, *args, **kwargs): + httplib.HTTPSConnection.__init__(self, *args, **kwargs) + + def connect(self): + sock = socket.create_connection((self.host, self.port), self.timeout) + if self._tunnel_host: + self.sock = sock + self._tunnel() + try: + self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file, ssl_version=ssl.PROTOCOL_SSLv3) + except ssl.SSLError, e: + print("Trying SSLv3.") + self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file, ssl_version=ssl.PROTOCOL_SSLv23) + +class HTTPSHandlerV3(urllib2.HTTPSHandler): + def https_open(self, req): + return self.do_open(HTTPSConnectionV3, req) + # Global constants const_version = '2011.02.08' const_project_url = 'http://sourceforge.jp/projects/nicovideo-dl' @@ -397,9 +419,9 @@ account_username = raw_input("Type Niconico E-mail account: ") account_password = getpass.getpass('Type Niconico password and press return: ') -# Install cookie and proxy handlers -urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())) -urllib2.install_opener(urllib2.build_opener(urllib2.HTTPCookieProcessor())) +# Install cookie and custom https handlers +urllib2.install_opener(urllib2.build_opener(urllib2.HTTPCookieProcessor(), HTTPSHandlerV3())) + # Log in if account_username is not None: -- System Information: Debian Release: 7.0 APT prefers stable APT policy: (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 3.9.2-dirty (SMP w/12 CPU cores; PREEMPT) Locale: LANG=ja_JP.UTF-8, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages nicovideo-dl depends on: ii python 2.7.3-4 nicovideo-dl recommends no packages. nicovideo-dl suggests no packages. -- debconf-show failed -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org