From 371ed3e634a9de63d9a5a707a033541272f67437 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Thu, 30 Dec 2010 18:20:44 +0100 Subject: MU premium lifetime fix --- module/plugins/Plugin.py | 8 +++++++- module/plugins/accounts/MegauploadCom.py | 5 +++++ 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'module/plugins') diff --git a/module/plugins/Plugin.py b/module/plugins/Plugin.py index 8a26996d0..d9ca4e5d9 100644 --- a/module/plugins/Plugin.py +++ b/module/plugins/Plugin.py @@ -111,6 +111,8 @@ class Plugin(object): self.lastCheck = None #re match of last checked matched self.js = self.core.js # js engine + self.html = None #some plugins store html code here + #self.setup() def getChunkCount(self): @@ -388,4 +390,8 @@ class Plugin(object): del self.pyfile if hasattr(self, "req"): self.req.close() - del self.req \ No newline at end of file + del self.req + if hasattr(self, "thread"): + del self.thread + if hasattr(self, "html"): + del self.html \ No newline at end of file diff --git a/module/plugins/accounts/MegauploadCom.py b/module/plugins/accounts/MegauploadCom.py index 2f33e791b..df539507c 100644 --- a/module/plugins/accounts/MegauploadCom.py +++ b/module/plugins/accounts/MegauploadCom.py @@ -33,6 +33,8 @@ class MegauploadCom(Account): def loadAccountInfo(self, user, req): page = req.load("http://www.megaupload.com/?c=account") + open("mu.html", "wb").write(page) + free = re.findall(r"Account type:\s*\s*
\s*Regular",page,re.IGNORECASE+re.MULTILINE) if free: return {"validuntil": -1, "trafficleft":-1, "premium": False} @@ -40,6 +42,9 @@ class MegauploadCom(Account): 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) -- cgit v1.2.3