diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-11-16 17:50:39 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-11-16 17:50:39 +0100 |
commit | ad274af55174570bd2e6e7db194e87007a13c5c7 (patch) | |
tree | 30b6799eec09fd1afd4e3a074d4e96805394be78 /module/plugins/accounts/MegauploadCom.py | |
parent | forgot to remove some debug prints (diff) | |
download | pyload-ad274af55174570bd2e6e7db194e87007a13c5c7.tar.xz |
closed #153
Diffstat (limited to 'module/plugins/accounts/MegauploadCom.py')
-rw-r--r-- | module/plugins/accounts/MegauploadCom.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/module/plugins/accounts/MegauploadCom.py b/module/plugins/accounts/MegauploadCom.py index dce6fb088..e14cf7a28 100644 --- a/module/plugins/accounts/MegauploadCom.py +++ b/module/plugins/accounts/MegauploadCom.py @@ -33,13 +33,17 @@ class MegauploadCom(Account): def loadAccountInfo(self, user, req): page = req.load("http://www.megaupload.com/?c=account") + free = re.findall(r"Account type:</TD>\s*<TD><b>Regular</b>",page,re.IGNORECASE+re.MULTILINE) + if free: + return {"validuntil": -1, "trafficleft":-1, "premium": False} + if 'id="directdownloadstxt">Activate' in page: self.core.log.warning(_("Activate direct Download in your MegaUpload Account")) valid = re.search(r"(\d+) days remaining", page).group(1) valid = time()+ 60 * 60 * 24 * int(valid) - return {"validuntil": valid, "trafficleft": -1} + return {"validuntil": valid, "trafficleft": -1, "premium": True} def login(self, user, data, req): |