diff options
author | Walter Purcaro <vuolter@gmail.com> | 2015-02-16 10:46:28 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2015-02-16 10:46:28 +0100 |
commit | ce1c2b6b05c08b669357947e61ae40efce7fc50f (patch) | |
tree | 0b5f7996960cf35c4eface53a89eba18a37519b7 /pyload/plugin/account/FreakshareCom.py | |
parent | Fix filename case (diff) | |
download | pyload-ce1c2b6b05c08b669357947e61ae40efce7fc50f.tar.xz |
module temp
Diffstat (limited to 'pyload/plugin/account/FreakshareCom.py')
-rw-r--r-- | pyload/plugin/account/FreakshareCom.py | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/pyload/plugin/account/FreakshareCom.py b/pyload/plugin/account/FreakshareCom.py deleted file mode 100644 index 9905e3f55..000000000 --- a/pyload/plugin/account/FreakshareCom.py +++ /dev/null @@ -1,43 +0,0 @@ -# -*- coding: utf-8 -*- - -import re - -from time import strptime, mktime - -from pyload.plugin.Account import Account - - -class FreakshareCom(Account): - __name__ = "FreakshareCom" - __type__ = "account" - __version__ = "0.11" - - __description__ = """Freakshare.com account plugin""" - __license__ = "GPLv3" - __authors__ = [("RaNaN", "RaNaN@pyload.org")] - - - def loadAccountInfo(self, user, req): - page = req.load("http://freakshare.com/") - - validuntil = r'ltig bis:</td>\s*<td><b>([\d.:-]+)</b></td>' - validuntil = re.search(validuntil, page, re.M) - validuntil = validuntil.group(1).strip() - validuntil = mktime(strptime(validuntil, "%d.%m.%Y - %H:%M")) - - traffic = r'Traffic verbleibend:</td>\s*<td>([^<]+)' - traffic = re.search(traffic, page, re.M) - traffic = traffic.group(1).strip() - traffic = self.parseTraffic(traffic) - - return {"validuntil": validuntil, "trafficleft": traffic} - - - def login(self, user, data, req): - req.load("http://freakshare.com/index.php?language=EN") - - page = req.load("http://freakshare.com/login.html", None, - {"submit": "Login", "user": user, "pass": data['password']}, cookies=True) - - if ">Wrong Username or Password" in page: - self.wrongPassword() |