Skip to content

Problems with any requests #85

@3JIou

Description

@3JIou
import tpb

__author__ = 'batman'

t = tpb.TPB('https://thepiratebay.bid')
for torrent in t.top().category(tpb.CATEGORIES.VIDEO.MOVIES):
    print(torrent.files)

Connected to pydev debugger (build 143.1919)
Traceback (most recent call last):
  File "/root/.pycharm_helpers/pydev/pydevd.py", line 2411, in <module>
    globals = debugger.run(setup['file'], None, None, is_module)
  File "/root/.pycharm_helpers/pydev/pydevd.py", line 1802, in run
    launch(file, globals, locals)  # execute the script
  File "/root/torrent_parser/tpb/tox-test.py", line 10, in <module>
    for torrent in t.top().category(tpb.CATEGORIES.VIDEO.MOVIES):
  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 154, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python2.7/urllib2.py", line 437, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 550, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 475, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 558, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 403: Forbidden

if i will change url tpb.TPB('https://thepiratebay.bid') - result not changed. sorry for my english

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions