diff options
author | gsasch <gsasch@gmail.com> | 2014-12-30 02:15:15 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-12-30 02:15:15 +0100 |
commit | f23eea11a1db7b742684c2cace195748dd684020 (patch) | |
tree | 02d1f81d6879feab8493bc042abdc92ac3706856 | |
parent | [AlldebridCom] Code cosmetics (diff) | |
download | pyload-f23eea11a1db7b742684c2cace195748dd684020.tar.xz |
[UploadableCh] Account
-rw-r--r-- | module/plugins/accounts/UploadableCh.py | 33 | ||||
-rw-r--r-- | module/plugins/hoster/UploadableCh.py | 7 |
2 files changed, 34 insertions, 6 deletions
diff --git a/module/plugins/accounts/UploadableCh.py b/module/plugins/accounts/UploadableCh.py new file mode 100644 index 000000000..14c19adda --- /dev/null +++ b/module/plugins/accounts/UploadableCh.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- + +from module.plugins.Account import Account + + +class UploadableCh(Account): + __name__ = "UploadableCh" + __type__ = "account" + __version__ = "0.02" + + __description__ = """Uploadable.ch account plugin""" + __license__ = "GPLv3" + __authors__ = [("Sasch", "gsasch@gmail.com")] + + + def loadAccountInfo(self, user, req): + html = req.load("http://www.uploadable.ch/login.php") + + premium = '<a href="/logout.php"' in html + trafficleft = -1 if premium else None + + return {'validuntil': None, 'trafficleft': trafficleft, 'premium': premium} #@TODO: validuntil + + + def login(self, user, data, req): + html = req.load("http://www.uploadable.ch/login.php", + post={'userName' : user, + 'userPassword' : data["password"], + 'autoLogin' : "1", + 'action__login': "normalLogin"}) + + if "Login failed" in html: + self.wrongPassword() diff --git a/module/plugins/hoster/UploadableCh.py b/module/plugins/hoster/UploadableCh.py index 6d8a032e9..b09e3ded4 100644 --- a/module/plugins/hoster/UploadableCh.py +++ b/module/plugins/hoster/UploadableCh.py @@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class UploadableCh(SimpleHoster): __name__ = "UploadableCh" __type__ = "hoster" - __version__ = "0.04" + __version__ = "0.05" __pattern__ = r'http://(?:www\.)?uploadable\.ch/file/(?P<ID>\w+)' @@ -33,11 +33,6 @@ class UploadableCh(SimpleHoster): RECAPTCHA_KEY = "6LdlJuwSAAAAAPJbPIoUhyqOJd7-yrah5Nhim5S3" - def setup(self): - self.multiDL = False - self.chunkLimit = 1 - - def handleFree(self): # Click the "free user" button and wait a = self.load(self.pyfile.url, cookies=True, post={'downloadLink': "wait"}, decode=True) |