diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-10-07 19:54:24 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-10-07 19:54:24 +0200 |
commit | be459e0b409dcd5e04edd75be374bd35d4018e9a (patch) | |
tree | 3f73e813d20608ff0d23eada8214a5124c85bff5 /pyload/plugins/account/TusfilesNet.py | |
parent | Merge branch 'stable' into 0.4.10 (diff) | |
parent | New __authors__ key replaces __author_name__ and __author_mail__ + Whitespace... (diff) | |
download | pyload-be459e0b409dcd5e04edd75be374bd35d4018e9a.tar.xz |
Merge branch 'stable' into 0.4.10
Conflicts:
module/plugins/internal/CaptchaService.py
pyload/plugins/account/EasybytezCom.py
pyload/plugins/account/TusfilesNet.py
pyload/plugins/base/OCR.py
pyload/plugins/crypter/MultiuploadCom.py
pyload/plugins/crypter/UploadableChFolder.py
pyload/plugins/hoster/DuploadOrg.py
pyload/plugins/hoster/EpicShareNet.py
pyload/plugins/hoster/LemUploadsCom.py
pyload/plugins/hoster/LoadTo.py
pyload/plugins/hoster/LomafileCom.py
pyload/plugins/hoster/MegaFilesSe.py
pyload/plugins/hoster/MegareleaseOrg.py
pyload/plugins/hoster/PandaPlanet.py
pyload/plugins/hoster/PotloadCom.py
pyload/plugins/hoster/PremiumTo.py
pyload/plugins/hoster/TurbobitNet.py
pyload/plugins/internal/DeadCrypter.py
pyload/plugins/internal/DeadHoster.py
pyload/plugins/internal/SimpleCrypter.py
pyload/plugins/internal/UpdateManager.py
pyload/plugins/ocr/LinksaveIn.py
Diffstat (limited to 'pyload/plugins/account/TusfilesNet.py')
-rw-r--r-- | pyload/plugins/account/TusfilesNet.py | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/pyload/plugins/account/TusfilesNet.py b/pyload/plugins/account/TusfilesNet.py index b00770a59..6a80105be 100644 --- a/pyload/plugins/account/TusfilesNet.py +++ b/pyload/plugins/account/TusfilesNet.py @@ -4,26 +4,27 @@ import re from time import mktime, strptime, gmtime -from pyload.plugins.base.Account import Account -from pyload.plugins.internal.SimpleHoster import parseHtmlForm +from module.plugins.internal.XFSPAccount import XFSPAccount from pyload.utils import parseFileSize -class TusfilesNet(Account): +class TusfilesNet(XFSPAccount): __name__ = "TusfilesNet" __type__ = "account" - __version__ = "0.01" + __version__ = "0.02" __description__ = """Tusfile.net account plugin""" - __author_name__ = "guidobelix" - __author_mail__ = "guidobelix@hotmail.it" + __authors__ = [("guidobelix", "guidobelix@hotmail.it")] + + + HOSTER_URL = "http://www.tusfiles.net/" VALID_UNTIL_PATTERN = r'<span class="label label-default">([^<]+)</span>' TRAFFIC_LEFT_PATTERN = r'<td><img src="//www.tusfiles.net/i/icon/meter.png" alt=""/></td>\n<td> (?P<S>[^<]+)</td>' def loadAccountInfo(self, user, req): - html = req.load("http://www.tusfiles.net/?op=my_account", decode=True) + html = req.load(self.HOSTER_URL, get={'op': "my_account"}, decode=True) validuntil = None trafficleft = None @@ -54,16 +55,3 @@ class TusfilesNet(Account): trafficleft = parseFileSize(trafficleft) * 1024 return {'validuntil': validuntil, 'trafficleft': trafficleft, 'premium': premium} - - - def login(self, user, data, req): - html = req.load("http://www.tusfiles.net/login.html", decode=True) - action, inputs = parseHtmlForm('name="FL"', html) - inputs.update({'login': user, - 'password': data['password'], - 'redirect': "http://www.tusfiles.net/"}) - - html = req.load("http://www.tusfiles.net/", post=inputs, decode=True) - - if 'Incorrect Login or Password' in html or '>Error<' in html: - self.wrongPassword() |