From 4b54ba1d071e8828a28ee5f7814e62002c10db8b Mon Sep 17 00:00:00 2001 From: zoidberg10 Date: Mon, 12 Dec 2011 23:55:45 +0100 Subject: Fix megaupload account info --- module/plugins/accounts/MegauploadCom.py | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) (limited to 'module/plugins') diff --git a/module/plugins/accounts/MegauploadCom.py b/module/plugins/accounts/MegauploadCom.py index b44914a99..12e510fcf 100644 --- a/module/plugins/accounts/MegauploadCom.py +++ b/module/plugins/accounts/MegauploadCom.py @@ -24,29 +24,27 @@ from module.plugins.Account import Account class MegauploadCom(Account): __name__ = "MegauploadCom" - __version__ = "0.1" + __version__ = "0.11" __type__ = "account" __description__ = """megaupload account plugin""" __author_name__ = ("RaNaN") __author_mail__ = ("RaNaN@pyload.org") - + def loadAccountInfo(self, user, req): page = req.load("http://www.megaupload.com/?c=account") - - free = re.findall(r"Account type:\s*\s*
\s*Regular",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")) - - if "Lifetime Platinum" in page: - return {"validuntil": -1, "trafficleft": -1, "premium": True} - - valid = re.search(r"(\d+) days remaining", page).group(1) - valid = time()+ 60 * 60 * 24 * int(valid) - - return {"validuntil": valid, "trafficleft": -1, "premium": True} + + premium = True if r'