Skip to content

Commit

Permalink
fix bug :crash when downlink ret -1
Browse files Browse the repository at this point in the history
  • Loading branch information
chliny committed Dec 5, 2013
1 parent 723897c commit 58e7f5e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions xfdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,10 @@ def __gethttp(self,filelist):
num=int(num[0])-1
data = {'hash':self.filehash[num],'filename':self.filename[num],'browser':'other'}
str = self.__request(urlv,data)
self.filehttp[num]=(re.search(r'\"com_url\":\"(.+?)\"\,\"',str).group(1))
self.filecom[num]=(re.search(r'\"com_cookie":\"(.+?)\"\,\"',str).group(1))
comUrl = re.search(r'\"com_url\":\"(.+?)\"\,\"',str)
self.filehttp[num]=(comUrl.group(1)) if comUrl else ()
comCookie = re.search(r'\"com_cookie":\"(.+?)\"\,\"',str)
self.filecom[num]=(comCookie.group(1)) if comCookie else ()

def __chosetask(self):
_print ("请选择操作,输入回车(Enter)下载任务\nA添加任务,O在线观看,D删除任务,R刷新离线任务列表")
Expand Down

0 comments on commit 58e7f5e

Please # to comment.