summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-11-15 07:26:01 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-11-15 07:26:01 +0100
commiteb61d1bb0a30fd32f99b93f847346c610fbc91d2 (patch)
treef889dd1b19c0496f3f88c478445165abd98f9c7a /module/plugins/accounts
parent[HTTPRequest] Raise Fail if write response fails (diff)
downloadpyload-eb61d1bb0a30fd32f99b93f847346c610fbc91d2.tar.xz
Update plugins after merging
Diffstat (limited to 'module/plugins/accounts')
-rw-r--r--module/plugins/accounts/CatShareNet.py56
-rw-r--r--module/plugins/accounts/JunocloudMe.py16
-rw-r--r--module/plugins/accounts/Keep2shareCc.py69
-rw-r--r--module/plugins/accounts/LinestorageCom.py16
-rw-r--r--module/plugins/accounts/MegaRapidCz.py59
-rw-r--r--module/plugins/accounts/NowVideoAt.py56
-rw-r--r--module/plugins/accounts/RapidfileshareNet.py18
-rw-r--r--module/plugins/accounts/UploadcCom.py16
-rw-r--r--module/plugins/accounts/XFileSharingPro.py30
9 files changed, 0 insertions, 336 deletions
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.</a></li>\s*<li><a href="/premium">.*\s*<span style="color: red">(.*?)</span>[\s\w<>/]*href="/logout"'
- VALID_UNTIL_PATTERN = r'<div class="span6 pull-right">[\s\w<>=-":;]*<span style="font-size:13px;">.*?<strong>(.*?)</strong></span>'
-
-
- 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 '<a href="/logout">Wyloguj</a>' 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: <b>(.+?)</b>'
- TRAFFIC_LEFT_PATTERN = r'Available traffic \(today\):<b><a href="/user/statistic.html">(.+?)</a>'
-
- 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'<td>Max. počet paralelních stahování: </td><td>(\d+)'
- VALID_UNTIL_PATTERN = ur'<td>Paušální stahování aktivní. Vyprší </td><td><strong>(.*?)</strong>'
- TRAFFIC_LEFT_PATTERN = r'<tr><td>Kredit</td><td>(.*?) 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:</TD><TD><label for="name">\s*(?P<S>[\d.,]+)\s*(?:(?P<U>[\w^_]+))?'
diff --git a/module/plugins/accounts/UploadcCom.py b/module/plugins/accounts/UploadcCom.py
deleted file mode 100644
index d1e1a2ead..000000000
--- a/module/plugins/accounts/UploadcCom.py
+++ /dev/null
@@ -1,16 +0,0 @@
-# -*- coding: utf-8 -*-
-
-from module.plugins.internal.XFSAccount import XFSAccount
-
-
-class UploadcCom(XFSAccount):
- __name__ = "UploadcCom"
- __type__ = "account"
- __version__ = "0.02"
-
- __description__ = """Uploadc.com account plugin"""
- __license__ = "GPLv3"
- __authors__ = [("Walter Purcaro", "vuolter@gmail.com")]
-
-
- HOSTER_DOMAIN = "uploadc.com"
diff --git a/module/plugins/accounts/XFileSharingPro.py b/module/plugins/accounts/XFileSharingPro.py
deleted file mode 100644
index fb77ab23f..000000000
--- a/module/plugins/accounts/XFileSharingPro.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# -*- coding: utf-8 -*-
-
-from module.plugins.internal.XFSAccount import XFSAccount
-
-
-class XFileSharingPro(XFSAccount):
- __name__ = "XFileSharingPro"
- __type__ = "account"
- __version__ = "0.05"
-
- __description__ = """XFileSharingPro multi-purpose account plugin"""
- __license__ = "GPLv3"
- __authors__ = [("Walter Purcaro", "vuolter@gmail.com")]
-
-
- HOSTER_DOMAIN = None
-
-
- def init(self):
- if self.HOSTER_DOMAIN:
- return super(XFileSharingPro, self).init()
-
-
- def loadAccountInfo(self, user, req):
- return super(XFileSharingPro if self.HOSTER_DOMAIN else XFSAccount, self).loadAccountInfo(user, req)
-
-
- def login(self, user, data, req):
- if self.HOSTER_DOMAIN:
- return super(XFileSharingPro, self).login(user, data, req)