Skip to content

Commit

Permalink
Use new api to get task list.
Browse files Browse the repository at this point in the history
BTW, Fix following issue, 

Traceback (most recent call last):
  File "./xfdown.py", line 134, in <module>
    XFdownUi().main()
  File "./xfdown.py", line 96, in main
    self.work()
  File "./xfdown.py", line 100, in work
    xf.download(self.getSelected())
  File "/home/trinity/Workspace/xfdown/xfdown_api.py", line 111, in download
    self.gethttp(lists)
  File "/home/trinity/Workspace/xfdown/xfdown_api.py", line 306, in gethttp
    self.filehttp[num]=(re.search(r'\"com_url\":\"(.+?)\"\,\"',str).group(1))
AttributeError: 'NoneType' object has no attribute 'group'
  • Loading branch information
kamikat committed Dec 5, 2013
1 parent 8b25315 commit 870c23f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xfdown_api.py
Expand Up @@ -250,8 +250,8 @@ def getlist(self):
"""
得到任务名与hash值
"""
urlv = 'http://lixian.qq.com/handler/lixian/get_lixian_list.php'
res = self.__request(urlv)
urlv = 'http://lixian.qq.com/handler/lixian/get_lixian_items.php'
res = self.__request(urlv, {'page': 0, 'limit': 500})
res = json.JSONDecoder().decode(res)
result = []
if res["msg"]==_('未登录!'):
Expand All @@ -273,7 +273,7 @@ def getlist(self):
for num in range(len(res['data'])):
index=res['data'][num]
self.filename.append(index['file_name'].encode("u8"))
self.filehash.append(index['code'])
self.filehash.append(index['hash'])
size=index['file_size']
self.filemid.append(index['mid'])
if size==0:
Expand Down

0 comments on commit 870c23f

Please sign in to comment.