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

Error when iterating through search response #82

Open
adammo1990 opened this issue Jul 29, 2015 · 2 comments
Open

Error when iterating through search response #82

adammo1990 opened this issue Jul 29, 2015 · 2 comments

Comments

@adammo1990
Copy link

Error:

  Traceback (most recent call last):
    File "/home/adammo/python/TPBSearch.py", line 12, in <module>
    for torrent in search:
  File "/usr/local/lib/python2.7/dist-packages/tpb/tpb.py", line 149, in items
    for item in super(Paginated, self).items():
  File "/usr/local/lib/python2.7/dist-packages/tpb/tpb.py", line 59, in items
    request = urlopen(str(self.url))
  File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/lib/python2.7/urllib2.py", line 404, in open
    response = self._open(req, data)
  File "/usr/lib/python2.7/urllib2.py", line 422, in _open
    '_open', req)
  File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 1222, in https_open
    return self.do_open(httplib.HTTPSConnection, req)
  File "/usr/lib/python2.7/urllib2.py", line 1184, in do_open
    raise URLError(err)
urllib2.URLError: <urlopen error [Errno 1] _ssl.c:510: error:14077438:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert internal error>

Here's my code:

from tpb import TPB
from tpb import CATEGORIES, ORDERS

t = TPB('https://thepiratebay.se')
search = t.search('some movie name', category=CATEGORIES.VIDEO.MOVIES)

for torrent in search:
    print(torrent.info)
@yask123
Copy link

yask123 commented Aug 1, 2015

I am getting the same error

@sebastian9er
Copy link

I fixed the error by installing the following packages:
pip install pyopenssl ndg-httpsclient pyasn1

As instructed here:
http://flexget.com/ticket/2992#comment:10

(They had a similar error)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants