From d8f424dd6fcfd68a5e758a95347668d5a2939984 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sat, 4 Sep 2010 14:42:56 +0200 Subject: hoster fixes, new tray icon --- module/plugins/hoster/MegauploadCom.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/MegauploadCom.py') diff --git a/module/plugins/hoster/MegauploadCom.py b/module/plugins/hoster/MegauploadCom.py index a4a577c04..8f22f4a66 100644 --- a/module/plugins/hoster/MegauploadCom.py +++ b/module/plugins/hoster/MegauploadCom.py @@ -72,15 +72,17 @@ class MegauploadCom(Hoster): for i in range(5): self.html[0] = self.load(self.pyfile.url) count = 0 - while re.search("document.location='http://www.megaupload.com/?c=msg", self.html[0]) != None: + while "document.location='http://www.megaupload.com/?c=msg" in self.html[0]: # megaupload.com/?c=msg usually says: Please check back in 2 minutes, # so we can spare that http request self.setWait(120) - self.wantReconnect = True + if count > 1: + self.wantReconnect = True + self.wait() self.html[0] = self.load(self.pyfile.url) - count ++ + count += 1 if count > 5: self.fail(_("%s: Megaupload is currently blocking your IP. Try again later, manually."% self.__name__)) -- cgit v1.2.3