summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/account/UploadingCom.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-12-13 15:56:57 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-12-13 15:56:57 +0100
commitacc46fc3497a66a427b795b4a22c6e71d69185a1 (patch)
tree2d315b838a76435fc456b972c99c28d1732b2f70 /pyload/plugins/account/UploadingCom.py
parentCode fixes (diff)
downloadpyload-acc46fc3497a66a427b795b4a22c6e71d69185a1.tar.xz
Update
Diffstat (limited to 'pyload/plugins/account/UploadingCom.py')
-rw-r--r--pyload/plugins/account/UploadingCom.py63
1 files changed, 0 insertions, 63 deletions
diff --git a/pyload/plugins/account/UploadingCom.py b/pyload/plugins/account/UploadingCom.py
deleted file mode 100644
index b7eecd6b6..000000000
--- a/pyload/plugins/account/UploadingCom.py
+++ /dev/null
@@ -1,63 +0,0 @@
-# -*- coding: utf-8 -*-
-
-import re
-
-from time import time, strptime, mktime
-
-from pyload.plugins.Account import Account
-from pyload.plugins.internal.SimpleHoster import set_cookies
-
-
-class UploadingCom(Account):
- __name = "UploadingCom"
- __type = "account"
- __version = "0.11"
-
- __description = """Uploading.com account plugin"""
- __license = "GPLv3"
- __authors = [("mkaay", "mkaay@mkaay.de")]
-
-
- PREMIUM_PATTERN = r'UPGRADE TO PREMIUM'
- VALID_UNTIL_PATTERN = r'Valid Until:(.+?)<'
-
-
- def loadAccountInfo(self, user, req):
- validuntil = None
- trafficleft = None
- premium = None
-
- html = req.load("http://uploading.com/")
-
- premium = False if re.search(self.PREMIUM_PATTERN, html) else True
-
- m = re.search(self.VALID_UNTIL_PATTERN, html)
- if m:
- expiredate = m.group(1).strip()
- self.logDebug("Expire date: " + expiredate)
-
- try:
- validuntil = mktime(strptime(expiredate, "%b %d, %Y"))
-
- except Exception, e:
- self.logError(e)
-
- else:
- if validuntil > mktime(gmtime()):
- premium = True
- else:
- premium = False
- validuntil = None
-
- return {'validuntil': validuntil, 'trafficleft': trafficleft, 'premium': premium}
-
-
- def login(self, user, data, req):
- set_cookies([("uploading.com", "lang", "1"),
- ("uploading.com", "language", "1"),
- ("uploading.com", "setlang", "en"),
- ("uploading.com", "_lang", "en")]
-
- req.load("http://uploading.com/")
- req.load("http://uploading.com/general/login_form/?JsHttpRequest=%s-xml" % long(time() * 1000),
- post={'email': user, 'password': data['password'], 'remember': "on"})