iambus / xunlei-lixian

迅雷离线下载脚本
Other
1.97k stars 377 forks source link

无法add或者download了 #298

Open rosschen21 opened 11 years ago

rosschen21 commented 11 years ago

login,然后 lx d 1.torrent 或者lx add --bt 1.torrent 都是

File "/Users/ross/_my tools/xunlei/xunlei-lixian/lixian_query.py", line 53, in refresh_tasks self.tasks = self.fetch_tasks() File "/Users/ross/_my tools/xunlei/xunlei-lixian/lixian.py", line 266, in read_all_tasks tasks, next_link = self.read_task_page(type_id) File "/Users/ross/_my tools/xunlei/xunlei-lixian/lixian.py", line 254, in read_task_page return self.read_task_page_url(url) File "/Users/ross/_my tools/xunlei/xunlei-lixian/lixian.py", line 222, in read_task_page_url data = parse_json_response(page) File "/Users/ross/_my tools/xunlei/xunlei-lixian/lixian.py", line 646, in parse_json_response raise RuntimeError('Invalid response') RuntimeError: Invalid response

rosschen21 commented 11 years ago

代码今天clone的

iambus commented 11 years ago

是不是服务器的问题。在迅雷离线网页打开试试。

rosschen21 commented 11 years ago

网页没问题

xie-dongping commented 11 years ago

+1, 网页访问正常,同样错误。系统fedora 64bit, python 2.7.3

iambus commented 11 years ago

我也遇到过类似错误。但是一般再试一次就好了。

xie-dongping commented 11 years ago

3天下来没有一次可以的,应该不(只)是连接问题。

ctgnauh commented 11 years ago

删除 .xunlei.lixian.cookies 文件,然后重新登陆。

xie-dongping commented 11 years ago

遗憾的是,我连.xunlei.lixian.config都删掉了,多次重新登录以及list都没有用。网页版也有时会有“系统繁忙导致页面超时,请刷新页面或者稍候再试”的错误,但在网页版下载还是很快。

someone9388 commented 11 years ago

最近一直是这个问题,有人可用吗?

ctgnauh commented 11 years ago

同样有这个问题,但我多试几次就成功了。

发自我的 Windows Phone

-----原始邮件----- 发件人: "someone9388" notifications@github.com 发送时间: ‎2013/‎7/‎29 13:42 收件人: "iambus/xunlei-lixian" xunlei-lixian@noreply.github.com 抄送: "Tristan Huang" tristan.j.huang@gmail.com 主题: Re: [xunlei-lixian] 无法add或者download了 (#298)

最近一直是这个问题,有人可用吗? — Reply to this email directly or view it on GitHub.

someone9388 commented 11 years ago

迅雷有因为下载量大而封IP 的机制吗

iambus commented 11 years ago

我这边没看到类似现象。你可以试下

lx list --log-path=lixian.log --log-level=trace

再抛Invalid response的错误就会把内容写到lixian.log里。你可以把log文件发到我的邮箱(iambus@gmail.com)里看看。

iambus commented 11 years ago

现在怀疑这个问题和任务数目有点关系。lx list会把全部的任务都列出来,如果任务很多,可能是在或许最后几页的时候出的错。可以用网页登录,看下一共有多少任务,分了多少页,点点后面的页看看有没有错误。

someone9388 commented 11 years ago

确实,我在出错的分页加了重试,就好了

发自我的 iPhone

在 2013-7-30,16:09,Boyu Guo notifications@github.com 写道:

现在怀疑这个问题和任务数目有点关系。lx list会把全部的任务都列出来,如果任务很多,可能是在或许最后几页的时候出的错。可以用网页登录,看下一共有多少任务,分了多少页,点点后面的页看看有没有错误。

— Reply to this email directly or view it on GitHub.

iambus commented 11 years ago

最新的代码加了简单的retry,可以试试是否有效果。

xie-dongping commented 11 years ago

6次自动retry后可以list了...

iambus commented 11 years ago

默认是3次retry。6次说明是不止一个分页请求的时候出错了,几个分页加起来retry了6次。(要不然就是你自己改了代码?)

someone9388 commented 11 years ago

嗯 改了一点 就加了重试

发自我的 iPhone

在 2013-7-31,10:38,Boyu Guo notifications@github.com 写道:

你改了代码吗?

— Reply to this email directly or view it on GitHub.

xie-dongping commented 11 years ago

load网页出错太多了,除了改重试次数没有办法啊。

iambus commented 11 years ago

@DongpingXieTUD “load网页出错太多了”是什么情况?一直失败最后无法成功吗?你加上--log-level=debug,再把屏幕的输入发给我看看。

xie-dongping commented 11 years ago

我觉得不是楼主的问题,因为有时load网页也要load数次才可以。

以下为一次成功list的log。log-level=debug。用户名和userID我手动替换了。 http://dynamic.cloud.vip.xunlei.com/user_task?userid=数字&st=0 login http://login.xunlei.com/check?u=用户名@gmail.com&cachetime=1375296677287 http://login.xunlei.com/sec2login/ http://dynamic.lixian.vip.xunlei.com/login?cachetime=1375296679597&from=0 http://dynamic.cloud.vip.xunlei.com/interface/showtask_unfresh?type_id=4&page=1&tasknum=100&p=1&interfrom=task Exception in user code: Traceback (most recent call last): File "/home/用户名/.sh/xunlei-lixian-master/lixian.py", line 21, in withretry return f(_args, _kwargs) File "/home/用户名/.sh/xunlei-lixian-master/lixian.py", line 243, in read_task_page_url data = parse_json_response(page) File "/home/用户名/.sh/xunlei-lixian-master/lixian.py", line 664, in parse_json_response raise RuntimeError('Invalid response') RuntimeError: Invalid response http://dynamic.cloud.vip.xunlei.com/interface/showtask_unfresh?type_id=4&page=1&tasknum=100&p=1&interfrom=task http://dynamic.cloud.vip.xunlei.com/interface/showtask_unfresh?type_id=4&page=2&tasknum=100&p=1&interfrom=task http://dynamic.cloud.vip.xunlei.com/interface/showtask_unfresh?type_id=4&page=3&tasknum=100&p=1&interfrom=task Exception in user code: Traceback (most recent call last): File "/home/用户名/.sh/xunlei-lixian-master/lixian.py", line 21, in withretry return f(_args, _kwargs) File "/home/用户名/.sh/xunlei-lixian-master/lixian.py", line 243, in read_task_page_url data = parse_json_response(page) File "/home/用户名/.sh/xunlei-lixian-master/lixian.py", line 664, in parse_json_response raise RuntimeError('Invalid response') RuntimeError: Invalid response http://dynamic.cloud.vip.xunlei.com/interface/showtask_unfresh?type_id=4&page=3&tasknum=100&p=1&interfrom=task http://dynamic.cloud.vip.xunlei.com/interface/showtask_unfresh?type_id=4&page=4&tasknum=100&p=1&interfrom=task Exception in user code: Traceback (most recent call last): File "/home/用户名/.sh/xunlei-lixian-master/lixian.py", line 21, in withretry return f(_args, _kwargs) File "/home/用户名/.sh/xunlei-lixian-master/lixian.py", line 243, in read_task_page_url data = parse_json_response(page) File "/home/用户名/.sh/xunlei-lixian-master/lixian.py", line 664, in parse_json_response raise RuntimeError('Invalid response') RuntimeError: Invalid response http://dynamic.cloud.vip.xunlei.com/interface/showtask_unfresh?type_id=4&page=4&tasknum=100&p=1&interfrom=task Exception in user code: Traceback (most recent call last): File "/home/用户名/.sh/xunlei-lixian-master/lixian.py", line 21, in withretry return f(_args, _kwargs) File "/home/用户名/.sh/xunlei-lixian-master/lixian.py", line 243, in read_task_page_url data = parse_json_response(page) File "/home/用户名/.sh/xunlei-lixian-master/lixian.py", line 664, in parse_json_response raise RuntimeError('Invalid response') RuntimeError: Invalid response http://dynamic.cloud.vip.xunlei.com/interface/showtask_unfresh?type_id=4&page=4&tasknum=100&p=1&interfrom=task Exception in user code: Traceback (most recent call last): File "/home/用户名/.sh/xunlei-lixian-master/lixian.py", line 21, in withretry return f(_args, _kwargs) File "/home/用户名/.sh/xunlei-lixian-master/lixian.py", line 243, in read_task_page_url data = parse_json_response(page) File "/home/用户名/.sh/xunlei-lixian-master/lixian.py", line 664, in parse_json_response raise RuntimeError('Invalid response') RuntimeError: Invalid response http://dynamic.cloud.vip.xunlei.com/interface/showtask_unfresh?type_id=4&page=4&tasknum=100&p=1&interfrom=task http://dynamic.cloud.vip.xunlei.com/interface/showtask_unfresh?type_id=4&page=5&tasknum=100&p=1&interfrom=task http://dynamic.cloud.vip.xunlei.com/interface/showtask_unfresh?type_id=4&page=6&tasknum=100&p=1&interfrom=task Exception in user code: Traceback (most recent call last): File "/home/用户名/.sh/xunlei-lixian-master/lixian.py", line 21, in withretry return f(_args, _kwargs) File "/home/用户名/.sh/xunlei-lixian-master/lixian.py", line 243, in read_task_page_url data = parse_json_response(page) File "/home/用户名/.sh/xunlei-lixian-master/lixian.py", line 664, in parse_json_response raise RuntimeError('Invalid response') RuntimeError: Invalid response http://dynamic.cloud.vip.xunlei.com/interface/showtask_unfresh?type_id=4&page=6&tasknum=100&p=1&interfrom=task http://dynamic.cloud.vip.xunlei.com/interface/showtask_unfresh?type_id=4&page=7&tasknum=100&p=1&interfrom=task Exception in user code: Traceback (most recent call last): File "/home/用户名/.sh/xunlei-lixian-master/lixian.py", line 21, in withretry return f(_args, _kwargs) File "/home/用户名/.sh/xunlei-lixian-master/lixian.py", line 243, in read_task_page_url data = parse_json_response(page) File "/home/用户名/.sh/xunlei-lixian-master/lixian.py", line 664, in parse_json_response raise RuntimeError('Invalid response') RuntimeError: Invalid response http://dynamic.cloud.vip.xunlei.com/interface/showtask_unfresh?type_id=4&page=7&tasknum=100&p=1&interfrom=task http://dynamic.cloud.vip.xunlei.com/interface/showtask_unfresh?type_id=4&page=8&tasknum=100&p=1&interfrom=task Exception in user code: Traceback (most recent call last): File "/home/用户名/.sh/xunlei-lixian-master/lixian.py", line 21, in withretry return f(_args, _kwargs) File "/home/用户名/.sh/xunlei-lixian-master/lixian.py", line 243, in read_task_page_url data = parse_json_response(page) File "/home/用户名/.sh/xunlei-lixian-master/lixian.py", line 664, in parse_json_response raise RuntimeError('Invalid response') RuntimeError: Invalid response http://dynamic.cloud.vip.xunlei.com/interface/showtask_unfresh?type_id=4&page=8&tasknum=100&p=1&interfrom=task Exception in user code: Traceback (most recent call last): File "/home/用户名/.sh/xunlei-lixian-master/lixian.py", line 21, in withretry return f(_args, _kwargs) File "/home/用户名/.sh/xunlei-lixian-master/lixian.py", line 243, in read_task_page_url data = parse_json_response(page) File "/home/用户名/.sh/xunlei-lixian-master/lixian.py", line 664, in parse_json_response raise RuntimeError('Invalid response') RuntimeError: Invalid response http://dynamic.cloud.vip.xunlei.com/interface/showtask_unfresh?type_id=4&page=8&tasknum=100&p=1&interfrom=task http://dynamic.cloud.vip.xunlei.com/interface/showtask_unfresh?type_id=4&page=9&tasknum=100&p=1&interfrom=task http://dynamic.cloud.vip.xunlei.com/interface/showtask_unfresh?type_id=4&page=10&tasknum=100&p=1&interfrom=task Exception in user code: Traceback (most recent call last): File "/home/用户名/.sh/xunlei-lixian-master/lixian.py", line 21, in withretry return f(_args, _kwargs) File "/home/用户名/.sh/xunlei-lixian-master/lixian.py", line 243, in read_task_page_url data = parse_json_response(page) File "/home/用户名/.sh/xunlei-lixian-master/lixian.py", line 664, in parse_json_response raise RuntimeError('Invalid response') RuntimeError: Invalid response http://dynamic.cloud.vip.xunlei.com/interface/showtask_unfresh?type_id=4&page=10&tasknum=100&p=1&interfrom=task Exception in user code: Traceback (most recent call last): File "/home/用户名/.sh/xunlei-lixian-master/lixian.py", line 21, in withretry return f(_args, *_kwargs) File "/home/用户名/.sh/xunlei-lixian-master/lixian.py", line 243, in read_task_page_url data = parse_json_response(page) File "/home/用户名/.sh/xunlei-lixian-master/lixian.py", line 664, in parse_json_response raise RuntimeError('Invalid response') RuntimeError: Invalid response http://dynamic.cloud.vip.xunlei.com/interface/showtask_unfresh?type_id=4&page=10&tasknum=100&p=1&interfrom=task

iambus commented 11 years ago

不用的任务勤删删吧。任务越多越容易出错。我找时间可以加个参数或者优化一下查询,很多时候可能没必要遍历所有的任务。

someone9388 commented 11 years ago

任务的删除操作貌似有时会不成功,如果这个能重试,拉列表应该会快些

发自我的 iPhone

在 2013-8-1,10:37,Boyu Guo notifications@github.com 写道:

不用的任务勤删删吧。任务越多越容易出错。

— Reply to this email directly or view it on GitHub.

iambus commented 11 years ago

删除的错误是什么样的?