summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Jeix <devnull@localhost> 2010-09-01 19:19:41 +0200
committerGravatar Jeix <devnull@localhost> 2010-09-01 19:19:41 +0200
commitc38bac9199d1d640a5363f03714461a2d187630a (patch)
treefef3f52c8c0e770fafa7007eb7ba97d4af300bcf
parentstring formating fix (diff)
downloadpyload-c38bac9199d1d640a5363f03714461a2d187630a.tar.xz
megaupload.com - first fix (file temporary not available error)
-rw-r--r--module/plugins/hoster/MegauploadCom.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/module/plugins/hoster/MegauploadCom.py b/module/plugins/hoster/MegauploadCom.py
index 3e257d0b1..bacc7d98f 100644
--- a/module/plugins/hoster/MegauploadCom.py
+++ b/module/plugins/hoster/MegauploadCom.py
@@ -80,7 +80,7 @@ class MegauploadCom(Hoster):
captchacode = re.search('name="captchacode" value="(.*)"', self.html[0]).group(1)
megavar = re.search('name="megavar" value="(.*)">', self.html[0]).group(1)
self.html[1] = self.load(self.pyfile.url, post={"captcha": captcha, "captchacode": captchacode, "megavar": megavar})
- if re.search(r"Waiting time before each download begins", self.html[1]) is not None:
+ if re.search(r"Waiting time before each download begins", self.html[1]) != None:
break
def get_file_url(self):
@@ -94,7 +94,17 @@ class MegauploadCom(Hoster):
def file_exists(self):
self.download_html()
- if re.search(r"Unfortunately, the link you have clicked is not available.", self.html[0]) is not None or \
- re.search(r"Download limit exceeded", self.html[0]):
+ if re.search(r"Unfortunately, the link you have clicked is not available.", self.html[0]) != None or \
+ re.search(r"Download limit exceeded", self.html[0]) != None:
return False
+
+ if re.search("The file you are trying to access is temporarily unavailable", self.html[0]) != None:
+ self.setWait(120)
+ self.log.debug("%s: The file is temporarily not available. Waiting 2 minutes." % self.__name__)
+ self.wait()
+
+ self.download_html()
+ if re.search("The file you are trying to access is temporarily unavailable", self.html[0]) != None:
+ self.fail("Looks like the file is still not available. Retry downloading later, manually.")
+
return True