adieu / xunlei

Python API for xunlei lixian
40 stars 12 forks source link

This script doesn't works on macOS 10.12 and Python 2.7 #1

Closed ghost closed 7 years ago

ghost commented 7 years ago
Traceback (most recent call last):
  File "t.py", line 51, in <module>
    items = xunlei_obj.dashboard()
  File "/tmp/xunlei/xunlei.py", line 188, in dashboard
    self.login()
  File "/tmp/xunlei/xunlei.py", line 145, in login
    response = self.request('http://login.xunlei.com/check?u=%s&cachetime=%s' % (self.username, get_cache()))
  File "/tmp/xunlei/xunlei.py", line 121, in request
    response = br.open(url, data)
  File "/Library/Python/2.7/site-packages/mechanize/_useragent.py", line 443, in open
    response = UserAgentBase.open(self, fullurl, data)
  File "/Library/Python/2.7/site-packages/mechanize/_opener.py", line 206, in open
    response = meth(req, response)
  File "/Library/Python/2.7/site-packages/mechanize/_urllib2_fork.py", line 467, in http_response
    'http', request, response, code, msg, hdrs)
  File "/Library/Python/2.7/site-packages/mechanize/_opener.py", line 230, in error
    return apply(self._call_chain, args)
  File "/Library/Python/2.7/site-packages/mechanize/_urllib2_fork.py", line 340, in _call_chain
    result = func(*args)
  File "/Library/Python/2.7/site-packages/mechanize/_urllib2_fork.py", line 489, in http_error_default
    raise response
urllib2.HTTPError: HTTP Error 404: Not Found
adieu commented 7 years ago

This library was developed several years ago. It's not compatible with Xunlei any longer.

You're more than welcome to send a PR to make it work again.