summaryrefslogtreecommitdiffstats
path: root/module/plugins
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-12-30 18:20:44 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-12-30 18:20:44 +0100
commit371ed3e634a9de63d9a5a707a033541272f67437 (patch)
treec382ebc95c970adab002339063a789c62dcec10f /module/plugins
parentimproved performance for wlan (diff)
downloadpyload-371ed3e634a9de63d9a5a707a033541272f67437.tar.xz
MU premium lifetime fix
Diffstat (limited to 'module/plugins')
-rw-r--r--module/plugins/Plugin.py8
-rw-r--r--module/plugins/accounts/MegauploadCom.py5
2 files changed, 12 insertions, 1 deletions
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*</div>\s*<div class=\"acc_txt_bl2\">\s*<b>Regular</b>",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 "<b>Lifetime Platinum</b>" 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)