From eb61d1bb0a30fd32f99b93f847346c610fbc91d2 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 15 Nov 2014 07:26:01 +0100 Subject: Update plugins after merging --- module/plugins/accounts/CatShareNet.py | 56 ---------------------- module/plugins/accounts/JunocloudMe.py | 16 ------- module/plugins/accounts/Keep2shareCc.py | 69 ---------------------------- module/plugins/accounts/LinestorageCom.py | 16 ------- module/plugins/accounts/MegaRapidCz.py | 59 ------------------------ module/plugins/accounts/NowVideoAt.py | 56 ---------------------- module/plugins/accounts/RapidfileshareNet.py | 18 -------- module/plugins/accounts/UploadcCom.py | 16 ------- module/plugins/accounts/XFileSharingPro.py | 30 ------------ 9 files changed, 336 deletions(-) delete mode 100644 module/plugins/accounts/CatShareNet.py delete mode 100644 module/plugins/accounts/JunocloudMe.py delete mode 100644 module/plugins/accounts/Keep2shareCc.py delete mode 100644 module/plugins/accounts/LinestorageCom.py delete mode 100644 module/plugins/accounts/MegaRapidCz.py delete mode 100644 module/plugins/accounts/NowVideoAt.py delete mode 100644 module/plugins/accounts/RapidfileshareNet.py delete mode 100644 module/plugins/accounts/UploadcCom.py delete mode 100644 module/plugins/accounts/XFileSharingPro.py (limited to 'module/plugins/accounts') diff --git a/module/plugins/accounts/CatShareNet.py b/module/plugins/accounts/CatShareNet.py deleted file mode 100644 index c33219685..000000000 --- a/module/plugins/accounts/CatShareNet.py +++ /dev/null @@ -1,56 +0,0 @@ -# -*- coding: utf-8 -*- - -import re - -from time import mktime, strptime - -from module.plugins.Account import Account - - -class CatShareNet(Account): - __name__ = "CatShareNet" - __type__ = "account" - __version__ = "0.01" - - __description__ = """CatShareNet account plugin""" - __license__ = "GPLv3" - __authors__ = [("prOq", None)] - - - PREMIUM_PATTERN = r'class="nav-collapse collapse pull-right">[\s\w<>=-."/:]*\sz.\s*
  • .*\s*(.*?)[\s\w<>/]*href="/logout"' - VALID_UNTIL_PATTERN = r'
    [\s\w<>=-":;]*.*?(.*?)' - - - def loadAccountInfo(self, user, req): - premium = False - validuntil = -1 - - html = req.load("http://catshare.net/", decode=True) - - try: - m = re.search(self.PREMIUM_PATTERN, html) - if "Premium" in m.group(1): - premium = True - except: - pass - - try: - m = re.search(self.VALID_UNTIL_PATTERN, html) - expiredate = m.group(1) - if "-" not in expiredate: - validuntil = mktime(strptime(expiredate, "%d.%m.%Y")) - except: - pass - - return {'premium': premium, 'trafficleft': -1, 'validuntil': validuntil} - - - def login(self, user, data, req): - html = req.load("http://catshare.net/login", - post={'user_email': user, - 'user_password': data['password'], - 'remindPassword': 0, - 'user[submit]': "Login"}) - - if not 'Wyloguj' in html: - self.wrongPassword() diff --git a/module/plugins/accounts/JunocloudMe.py b/module/plugins/accounts/JunocloudMe.py deleted file mode 100644 index b0fc160f3..000000000 --- a/module/plugins/accounts/JunocloudMe.py +++ /dev/null @@ -1,16 +0,0 @@ -# -*- coding: utf-8 -*- - -from module.plugins.internal.XFSAccount import XFSAccount - - -class JunocloudMe(XFSAccount): - __name__ = "JunocloudMe" - __type__ = "account" - __version__ = "0.02" - - __description__ = """Junocloud.me account plugin""" - __license__ = "GPLv3" - __authors__ = [("guidobelix", "guidobelix@hotmail.it")] - - - HOSTER_DOMAIN = "junocloud.me" diff --git a/module/plugins/accounts/Keep2shareCc.py b/module/plugins/accounts/Keep2shareCc.py deleted file mode 100644 index de9b9b5d8..000000000 --- a/module/plugins/accounts/Keep2shareCc.py +++ /dev/null @@ -1,69 +0,0 @@ -# -*- coding: utf-8 -*- - -import re - -from time import gmtime, mktime, strptime - -from module.plugins.Account import Account - - -class Keep2shareCc(Account): - __name__ = "Keep2shareCc" - __type__ = "account" - __version__ = "0.02" - - __description__ = """Keep2share.cc account plugin""" - __license__ = "GPLv3" - __authors__ = [("aeronaut", "aeronaut@pianoguy.de")] - - - VALID_UNTIL_PATTERN = r'Premium expires: (.+?)' - TRAFFIC_LEFT_PATTERN = r'Available traffic \(today\):(.+?)' - - LOGIN_FAIL_PATTERN = r'Please fix the following input errors' - - - def loadAccountInfo(self, user, req): - validuntil = None - trafficleft = None - premium = None - - html = req.load("http://keep2share.cc/site/profile.html", decode=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, "%Y.%m.%d")) - - except Exception, e: - self.logError(e) - - else: - if validuntil > mktime(gmtime()): - premium = True - else: - premium = False - validuntil = None - - m = re.search(self.TRAFFIC_LEFT_PATTERN, html) - if m: - try: - trafficleft = self.parseTraffic(m.group(1)) - - except Exception, e: - self.logError(e) - - return {'validuntil': validuntil, 'trafficleft': trafficleft, 'premium': premium} - - - def login(self, user, data, req): - req.cj.setCookie(".keep2share.cc", "lang", "en") - - html = req.load("http://keep2share.cc/login.html", - post={'LoginForm[username]': user, 'LoginForm[password]': data['password']}) - - if re.search(self.LOGIN_FAIL_PATTERN, html): - self.wrongPassword() diff --git a/module/plugins/accounts/LinestorageCom.py b/module/plugins/accounts/LinestorageCom.py deleted file mode 100644 index cf8dd3f3e..000000000 --- a/module/plugins/accounts/LinestorageCom.py +++ /dev/null @@ -1,16 +0,0 @@ -# -*- coding: utf-8 -*- - -from module.plugins.internal.XFSAccount import XFSAccount - - -class LinestorageCom(XFSAccount): - __name__ = "LinestorageCom" - __type__ = "account" - __version__ = "0.02" - - __description__ = """Linestorage.com account plugin""" - __license__ = "GPLv3" - __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] - - - HOSTER_DOMAIN = "linestorage.com" diff --git a/module/plugins/accounts/MegaRapidCz.py b/module/plugins/accounts/MegaRapidCz.py deleted file mode 100644 index 41da7ac73..000000000 --- a/module/plugins/accounts/MegaRapidCz.py +++ /dev/null @@ -1,59 +0,0 @@ -# -*- coding: utf-8 -*- - -import re - -from time import mktime, strptime -from module.plugins.Account import Account - - -class MegaRapidCz(Account): - __name__ = "MegaRapidCz" - __type__ = "account" - __version__ = "0.34" - - __description__ = """MegaRapid.cz account plugin""" - __license__ = "GPLv3" - __authors__ = [("MikyWoW", "mikywow@seznam.cz"), - ("zoidberg", "zoidberg@mujmail.cz")] - - - login_timeout = 60 - - LIMITDL_PATTERN = ur'Max. počet paralelních stahování: (\d+)' - VALID_UNTIL_PATTERN = ur'Paušální stahování aktivní. Vyprší (.*?)' - TRAFFIC_LEFT_PATTERN = r'Kredit(.*?) GiB' - - - def loadAccountInfo(self, user, req): - html = req.load("http://megarapid.cz/mujucet/", decode=True) - - m = re.search(self.LIMITDL_PATTERN, html) - if m: - data = self.getAccountData(user) - data['options']['limitDL'] = [int(m.group(1))] - - m = re.search(self.VALID_UNTIL_PATTERN, html) - if m: - validuntil = mktime(strptime(m.group(1), "%d.%m.%Y - %H:%M")) - return {"premium": True, "trafficleft": -1, "validuntil": validuntil} - - m = re.search(self.TRAFFIC_LEFT_PATTERN, html) - if m: - trafficleft = float(m.group(1)) * (1 << 20) - return {"premium": True, "trafficleft": trafficleft, "validuntil": -1} - - return {"premium": False, "trafficleft": None, "validuntil": None} - - - def login(self, user, data, req): - htm = req.load("http://megarapid.cz/prihlaseni/") - if "Heslo:" in htm: - start = htm.index('id="inp_hash" name="hash" value="') - htm = htm[start + 33:] - hashes = htm[0:32] - htm = req.load("http://megarapid.cz/prihlaseni/", - post={"hash": hashes, - "login": user, - "pass1": data['password'], - "remember": 0, - "sbmt": u"Přihlásit"}) diff --git a/module/plugins/accounts/NowVideoAt.py b/module/plugins/accounts/NowVideoAt.py deleted file mode 100644 index 234984b6b..000000000 --- a/module/plugins/accounts/NowVideoAt.py +++ /dev/null @@ -1,56 +0,0 @@ -# -*- coding: utf-8 -*- - -import re - -from time import gmtime, mktime, strptime - -from module.plugins.Account import Account - - -class NowVideoAt(Account): - __name__ = "NowVideoAt" - __type__ = "account" - __version__ = "0.01" - - __description__ = """NowVideo.at account plugin""" - __license__ = "GPLv3" - __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] - - - VALID_UNTIL_PATTERN = r'>Your premium membership expires on: (.+?)<' - - - def loadAccountInfo(self, user, req): - validuntil = None - trafficleft = -1 - premium = None - - html = req.load("http://www.nowvideo.at/premium.php") - - 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, "%Y-%b-%d")) - - except Exception, e: - self.logError(e) - - else: - if validuntil > mktime(gmtime()): - premium = True - else: - premium = False - validuntil = -1 - - return {"validuntil": validuntil, "trafficleft": trafficleft, "premium": premium} - - - def login(self, user, data, req): - html = req.load("http://www.nowvideo.at/login.php", - post={'user': user, 'pass': data['password']}) - - if ">Invalid login details" is html: - self.wrongPassword() diff --git a/module/plugins/accounts/RapidfileshareNet.py b/module/plugins/accounts/RapidfileshareNet.py deleted file mode 100644 index c0dd7eaee..000000000 --- a/module/plugins/accounts/RapidfileshareNet.py +++ /dev/null @@ -1,18 +0,0 @@ -# -*- coding: utf-8 -*- - -from module.plugins.internal.XFSAccount import XFSAccount - - -class RapidfileshareNet(XFSAccount): - __name__ = "RapidfileshareNet" - __type__ = "account" - __version__ = "0.05" - - __description__ = """Rapidfileshare.net account plugin""" - __license__ = "GPLv3" - __authors__ = [("guidobelix", "guidobelix@hotmail.it")] - - - HOSTER_DOMAIN = "rapidfileshare.net" - - TRAFFIC_LEFT_PATTERN = r'>Traffic available today: