Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
I use python python 2.7.9 and it will an error, and I found it may due to SSL verification in Python 2.7.9 from some discussion HenriWahl/Nagstamon#126 (comment).
I replace urllib2 by requests to make sure it works in python2.7 in this PR.
Traceback (most recent call last):
File "./og.py", line 5, in
video = opengraph.OpenGraph(url="http://www.youtube.com/watch?v=q3ixBmDzylQ")
File "/usr/local/lib/python2.7/site-packages/opengraph/opengraph.py", line 36, in init
self.fetch(url)
File "/usr/local/lib/python2.7/site-packages/opengraph/opengraph.py", line 50, in fetch
raw = urllib2.urlopen(url)
File "/usr/local/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/usr/local/lib/python2.7/urllib2.py", line 437, in open
response = meth(req, response)
File "/usr/local/lib/python2.7/urllib2.py", line 550, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/local/lib/python2.7/urllib2.py", line 469, in error
result = self._call_chain(_args)
File "/usr/local/lib/python2.7/urllib2.py", line 409, in _call_chain
result = func(_args)
File "/usr/local/lib/python2.7/urllib2.py", line 656, in http_error_302
return self.parent.open(new, timeout=req.timeout)
File "/usr/local/lib/python2.7/urllib2.py", line 431, in open
response = self._open(req, data)
File "/usr/local/lib/python2.7/urllib2.py", line 449, in _open
'_open', req)
File "/usr/local/lib/python2.7/urllib2.py", line 409, in _call_chain
result = func(*args)
File "/usr/local/lib/python2.7/urllib2.py", line 1240, in https_open
context=self._context)
File "/usr/local/lib/python2.7/urllib2.py", line 1197, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)>