Skip to content

Commit

Permalink
修复登录失败时不出现添加任务的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
chliny committed Oct 27, 2013
1 parent 5b93d4e commit 8bee069
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions xfdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,13 @@ def start(self):

if not cookieload:
self.__Login(True)
else:
if self._addurl != '':
self.__addtask()

if self._addurl != '':
self.__addtask()

self.main()


self.main()
def __request(self,url,data=None,savecookie=False):
"""
请求url
Expand Down Expand Up @@ -177,7 +179,7 @@ def __request_login(self):
str = self.__request(url = urlv)
if str.find(_('登录成功')) != -1:
self.__getlogin()
self.main()
#self.main()
elif str.find(_('验证码不正确')) != -1:
self.__getverifycode()
self.__Login(False,True)
Expand Down Expand Up @@ -239,7 +241,7 @@ def __getlist(self):
loginres = json.JSONDecoder().decode(self.__getlogin())
if loginres is None or loginres["msg"]==_('未登录!'):
self.__Login()

self.main()
else:
self.main()
elif not res["data"]:
Expand Down

0 comments on commit 8bee069

Please # to comment.