I'm trying to retrieve a page on Flickr using urllib2
and I get the following error when I execute the command urllib2.urlopen('https://www.flickr.com')
File "/usr/lib/python2.7/urllib2.py", line 104, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 361, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 379, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 339, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1099, in https_open
return self.do_open(httplib.HTTPSConnection, req)
File "/usr/lib/python2.7/urllib2.py", line 1066, in do_open
raise URLError(err) urllib2.URLError: <urlopen error [Errno 111] Connection refused>
Apparently the problem occurs when I connect with HTTPS because with HTTP it works. FLickr uses TLS 1.2. I do not know if it's a version or SSL problem.
Does anyone know? I need to connect through HTTPS. Thanks