summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/accounts')
-rw-r--r--module/plugins/accounts/AlldebridCom.py39
-rw-r--r--module/plugins/accounts/BoltsharingCom.py12
-rw-r--r--module/plugins/accounts/CoolshareCz.py71
-rw-r--r--module/plugins/accounts/CramitIn.py12
-rw-r--r--module/plugins/accounts/CyberlockerCh.py31
-rw-r--r--module/plugins/accounts/CzshareCom.py6
-rw-r--r--module/plugins/accounts/DebridItaliaCom.py35
-rw-r--r--module/plugins/accounts/EgoFilesCom.py40
-rw-r--r--module/plugins/accounts/EuroshareEu.py55
-rw-r--r--module/plugins/accounts/FastshareCz.py52
-rw-r--r--module/plugins/accounts/FilebeerInfo.py57
-rw-r--r--module/plugins/accounts/FilerioCom.py12
-rw-r--r--module/plugins/accounts/FilesonicCom.py71
-rw-r--r--module/plugins/accounts/FshareVn.py37
-rw-r--r--module/plugins/accounts/Ftp.py13
-rw-r--r--module/plugins/accounts/HellshareCz.py41
-rw-r--r--module/plugins/accounts/Http.py13
-rw-r--r--module/plugins/accounts/MegauploadCom.py53
-rwxr-xr-xmodule/plugins/accounts/OronCom.py56
-rw-r--r--module/plugins/accounts/PremiumizeMe.py10
-rw-r--r--module/plugins/accounts/QuickshareCz.py53
-rw-r--r--module/plugins/accounts/RapidgatorNet.py74
-rw-r--r--module/plugins/accounts/RarefileNet.py12
-rw-r--r--module/plugins/accounts/ReloadCc.py73
-rw-r--r--module/plugins/accounts/Share76Com.py11
-rw-r--r--module/plugins/accounts/ShareFilesCo.py12
-rw-r--r--module/plugins/accounts/ShareRapidCom.py41
-rw-r--r--module/plugins/accounts/ShareonlineBiz.py73
-rw-r--r--module/plugins/accounts/SpeedLoadOrg.py12
-rw-r--r--module/plugins/accounts/UlozTo.py10
-rw-r--r--module/plugins/accounts/UptoboxCom.py12
-rw-r--r--module/plugins/accounts/WarserverCz.py45
32 files changed, 781 insertions, 363 deletions
diff --git a/module/plugins/accounts/AlldebridCom.py b/module/plugins/accounts/AlldebridCom.py
index f87a1c881..beaddeac9 100644
--- a/module/plugins/accounts/AlldebridCom.py
+++ b/module/plugins/accounts/AlldebridCom.py
@@ -3,10 +3,11 @@ import xml.dom.minidom as dom
from BeautifulSoup import BeautifulSoup
from time import time
import re
+import urllib
class AlldebridCom(Account):
__name__ = "AlldebridCom"
- __version__ = "0.2"
+ __version__ = "0.21"
__type__ = "account"
__description__ = """AllDebrid.com account plugin"""
__author_name__ = ("Andy, Voigt")
@@ -16,25 +17,33 @@ class AlldebridCom(Account):
data = self.getAccountData(user)
page = req.load("http://www.alldebrid.com/account/")
soup=BeautifulSoup(page)
- #Try to parse expiration date directly from the control panel page (better accuracy)
+ #Try to parse expiration date directly from the control panel page (better accuracy)
try:
- time_text=soup.find('div',attrs={'class':'remaining_time_text'}).strong.string
- self.log.debug("Account expires in: %s" % time_text)
- p = re.compile('\d+')
- exp_data=p.findall(time_text)
- exp_time=time()+int(exp_data[0])*24*60*60+int(exp_data[1])*60*60+(int(exp_data[2])-1)*60
- #Get expiration date from API
+ time_text=soup.find('div',attrs={'class':'remaining_time_text'}).strong.string
+ self.log.debug("Account expires in: %s" % time_text)
+ p = re.compile('\d+')
+ exp_data=p.findall(time_text)
+ exp_time=time()+int(exp_data[0])*24*60*60+int(exp_data[1])*60*60+(int(exp_data[2])-1)*60
+ #Get expiration date from API
except:
- data = self.getAccountData(user)
- page = req.load("http://www.alldebrid.com/api.php?action=info_user&login=%s&pw=%s" % (user, data["password"]))
- self.log.debug(page)
- xml = dom.parseString(page)
- exp_time=time()+int(xml.getElementsByTagName("date")[0].childNodes[0].nodeValue)*86400
+ data = self.getAccountData(user)
+ page = req.load("http://www.alldebrid.com/api.php?action=info_user&login=%s&pw=%s" % (user, data["password"]))
+ self.log.debug(page)
+ xml = dom.parseString(page)
+ exp_time=time()+int(xml.getElementsByTagName("date")[0].childNodes[0].nodeValue)*86400
account_info = {"validuntil": exp_time, "trafficleft": -1}
return account_info
def login(self, user, data, req):
- page = req.load("http://www.alldebrid.com/register/?action=login&login_login=%s&login_password=%s" % (user, data["password"]))
+
+ urlparams = urllib.urlencode({'action':'login','login_login':user,'login_password':data["password"]})
+ page = req.load("http://www.alldebrid.com/register/?%s" % (urlparams))
if "This login doesn't exist" in page:
- self.wrongPassword()
+ self.wrongPassword()
+
+ if "The password is not valid" in page:
+ self.wrongPassword()
+
+ if "Invalid captcha" in page:
+ self.wrongPassword()
diff --git a/module/plugins/accounts/BoltsharingCom.py b/module/plugins/accounts/BoltsharingCom.py
new file mode 100644
index 000000000..678591d1d
--- /dev/null
+++ b/module/plugins/accounts/BoltsharingCom.py
@@ -0,0 +1,12 @@
+# -*- coding: utf-8 -*-
+from module.plugins.internal.XFSPAccount import XFSPAccount
+
+class BoltsharingCom(XFSPAccount):
+ __name__ = "BoltsharingCom"
+ __version__ = "0.01"
+ __type__ = "account"
+ __description__ = """Boltsharing.com account plugin"""
+ __author_name__ = ("zoidberg")
+ __author_mail__ = ("zoidberg@mujmail.cz")
+
+ MAIN_PAGE = "http://boltsharing.com/"
diff --git a/module/plugins/accounts/CoolshareCz.py b/module/plugins/accounts/CoolshareCz.py
deleted file mode 100644
index 03686c729..000000000
--- a/module/plugins/accounts/CoolshareCz.py
+++ /dev/null
@@ -1,71 +0,0 @@
-# -*- coding: utf-8 -*-
-
-"""
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License,
- or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See the GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, see <http://www.gnu.org/licenses/>.
-
- @author: zoidberg
-"""
-
-#shares code with WarserverCz
-
-from module.plugins.Account import Account
-import re
-from time import mktime, strptime
-
-class CoolshareCz(Account):
- __name__ = "CoolshareCz"
- __version__ = "0.01"
- __type__ = "account"
- __description__ = """CoolShare.cz account plugin"""
- __author_name__ = ("zoidberg")
- __author_mail__ = ("zoidberg@mujmail.cz")
-
- VALID_UNTIL_PATTERN = ur'<li>Neomezené stahování do: <strong>(.+?)<'
- TRAFFIC_LEFT_PATTERN = ur'<li>Kredit: <strong>.*?\(\s*(.+?)\s*B\)'
-
- DOMAIN = "http://www.coolshare.cz"
-
- def loadAccountInfo(self, user, req):
- html = req.load("%s/uzivatele/prehled" % self.DOMAIN, decode = True)
-
- validuntil = trafficleft = None
- premium = False
-
- found = re.search(self.VALID_UNTIL_PATTERN, html)
- if found:
- self.logDebug("VALID_UNTIL", found.group(1))
- try:
- #validuntil = mktime(strptime(found.group(1), "%d %B %Y"))
- premium = True
- trafficleft = -1
- except Exception, e:
- self.logError(e)
-
- found = re.search(self.TRAFFIC_LEFT_PATTERN, html)
- if found:
- self.logDebug("TRAFFIC_LEFT", found.group(1))
- trafficleft = int(found.group(1).replace("&thinsp;","")) // 1024
- premium = True if trafficleft > 1 << 18 else False
-
- return ({"validuntil": validuntil, "trafficleft": trafficleft, "premium": premium})
-
- def login(self, user, data, req):
- html = req.load('%s/uzivatele/prihlaseni?do=prihlaseni-submit' % self.DOMAIN,
- post = {"username": user,
- "password": data['password'],
- "send": u"Přihlásit"},
- decode = True)
-
- if '<p class="chyba">' in html:
- self.wrongPassword() \ No newline at end of file
diff --git a/module/plugins/accounts/CramitIn.py b/module/plugins/accounts/CramitIn.py
new file mode 100644
index 000000000..182c9d647
--- /dev/null
+++ b/module/plugins/accounts/CramitIn.py
@@ -0,0 +1,12 @@
+# -*- coding: utf-8 -*-
+from module.plugins.internal.XFSPAccount import XFSPAccount
+
+class CramitIn(XFSPAccount):
+ __name__ = "CramitIn"
+ __version__ = "0.01"
+ __type__ = "account"
+ __description__ = """cramit.in account plugin"""
+ __author_name__ = ("zoidberg")
+ __author_mail__ = ("zoidberg@mujmail.cz")
+
+ MAIN_PAGE = "http://cramit.in/" \ No newline at end of file
diff --git a/module/plugins/accounts/CyberlockerCh.py b/module/plugins/accounts/CyberlockerCh.py
new file mode 100644
index 000000000..31e0c3e24
--- /dev/null
+++ b/module/plugins/accounts/CyberlockerCh.py
@@ -0,0 +1,31 @@
+# -*- coding: utf-8 -*-
+from module.plugins.internal.XFSPAccount import XFSPAccount
+from module.plugins.internal.SimpleHoster import parseHtmlForm
+
+class CyberlockerCh(XFSPAccount):
+ __name__ = "CyberlockerCh"
+ __version__ = "0.01"
+ __type__ = "account"
+ __description__ = """CyberlockerCh account plugin"""
+ __author_name__ = ("stickell")
+ __author_mail__ = ("l.stickell@yahoo.it")
+
+ MAIN_PAGE = "http://cyberlocker.ch/"
+
+ def login(self, user, data, req):
+ html = req.load(self.MAIN_PAGE + 'login.html', decode = True)
+
+ action, inputs = parseHtmlForm('name="FL"', html)
+ if not inputs:
+ inputs = {"op": "login",
+ "redirect": self.MAIN_PAGE}
+
+ inputs.update({"login": user,
+ "password": data['password']})
+
+ # Without this a 403 Forbidden is returned
+ req.http.lastURL = self.MAIN_PAGE + 'login.html'
+ html = req.load(self.MAIN_PAGE, post = inputs, decode = True)
+
+ if 'Incorrect Login or Password' in html or '>Error<' in html:
+ self.wrongPassword()
diff --git a/module/plugins/accounts/CzshareCom.py b/module/plugins/accounts/CzshareCom.py
index 695e21b18..e68248aa8 100644
--- a/module/plugins/accounts/CzshareCom.py
+++ b/module/plugins/accounts/CzshareCom.py
@@ -24,7 +24,7 @@ import re
class CzshareCom(Account):
__name__ = "CzshareCom"
- __version__ = "0.1"
+ __version__ = "0.11"
__type__ = "account"
__description__ = """czshare.com account plugin"""
__author_name__ = ("zoidberg")
@@ -48,11 +48,11 @@ class CzshareCom(Account):
def login(self, user, data, req):
- html = req.load('http://czshare.com/index.php', post={
+ html = req.load('https://czshare.com/index.php', post={
"Prihlasit": "Prihlasit",
"login-password": data["password"],
"login-name": user
})
- if "<p>You input a wrong user name or wrong password</p>" in html:
+ if '<div class="login' in html:
self.wrongPassword()
diff --git a/module/plugins/accounts/DebridItaliaCom.py b/module/plugins/accounts/DebridItaliaCom.py
new file mode 100644
index 000000000..d68f1c8a8
--- /dev/null
+++ b/module/plugins/accounts/DebridItaliaCom.py
@@ -0,0 +1,35 @@
+# -*- coding: utf-8 -*-
+
+import re
+import _strptime
+import time
+
+from module.plugins.Account import Account
+
+
+class DebridItaliaCom(Account):
+ __name__ = "DebridItaliaCom"
+ __version__ = "0.1"
+ __type__ = "account"
+ __description__ = """debriditalia.com account plugin"""
+ __author_name__ = ("stickell")
+ __author_mail__ = ("l.stickell@yahoo.it")
+
+ WALID_UNTIL_PATTERN = r"Premium valid till: (?P<D>[^|]+) \|"
+
+ def loadAccountInfo(self, user, req):
+ if 'Account premium not activated' in self.html:
+ return {"premium": False, "validuntil": None, "trafficleft": None}
+
+ m = re.search(self.WALID_UNTIL_PATTERN, self.html)
+ if m:
+ validuntil = int(time.mktime(time.strptime(m.group('D'), "%d/%m/%Y %H:%M")))
+ return {"premium": True, "validuntil": validuntil, "trafficleft": -1}
+ else:
+ self.logError('Unable to retrieve account information - Plugin may be out of date')
+
+ def login(self, user, data, req):
+ self.html = req.load("http://debriditalia.com/login.php",
+ get={"u": user, "p": data["password"]})
+ if 'NO' in self.html:
+ self.wrongPassword()
diff --git a/module/plugins/accounts/EgoFilesCom.py b/module/plugins/accounts/EgoFilesCom.py
new file mode 100644
index 000000000..da1ed03ad
--- /dev/null
+++ b/module/plugins/accounts/EgoFilesCom.py
@@ -0,0 +1,40 @@
+# -*- coding: utf-8 -*-
+
+from module.plugins.Account import Account
+import re
+import time
+from module.utils import parseFileSize
+
+class EgoFilesCom(Account):
+ __name__ = "EgoFilesCom"
+ __version__ = "0.2"
+ __type__ = "account"
+ __description__ = """egofiles.com account plugin"""
+ __author_name__ = ("stickell")
+ __author_mail__ = ("l.stickell@yahoo.it")
+
+ PREMIUM_ACCOUNT_PATTERN = '<br/>\s*Premium: (?P<P>[^/]*) / Traffic left: (?P<T>[\d.]*) (?P<U>\w*)\s*\\n\s*<br/>'
+
+ def loadAccountInfo(self, user, req):
+ html = req.load("http://egofiles.com")
+ if 'You are logged as a Free User' in html:
+ return {"premium": False, "validuntil": None, "trafficleft": None}
+
+ m = re.search(self.PREMIUM_ACCOUNT_PATTERN, html)
+ if m:
+ validuntil = int(time.mktime(time.strptime(m.group('P'), "%Y-%m-%d %H:%M:%S")))
+ trafficleft = parseFileSize(m.group('T'), m.group('U')) / 1024
+ return {"premium": True, "validuntil": validuntil, "trafficleft": trafficleft}
+ else:
+ self.logError('Unable to retrieve account information - Plugin may be out of date')
+
+ def login(self, user, data, req):
+ # Set English language
+ req.load("https://egofiles.com/ajax/lang.php?lang=en", just_header=True)
+
+ html = req.load("http://egofiles.com/ajax/register.php",
+ post={"log": 1,
+ "loginV": user,
+ "passV": data["password"]})
+ if 'Login successful' not in html:
+ self.wrongPassword()
diff --git a/module/plugins/accounts/EuroshareEu.py b/module/plugins/accounts/EuroshareEu.py
new file mode 100644
index 000000000..42967d975
--- /dev/null
+++ b/module/plugins/accounts/EuroshareEu.py
@@ -0,0 +1,55 @@
+# -*- coding: utf-8 -*-
+
+"""
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License,
+ or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, see <http://www.gnu.org/licenses/>.
+
+ @author: zoidberg
+"""
+
+from module.plugins.Account import Account
+from time import mktime, strptime
+from string import replace
+import re
+
+class EuroshareEu(Account):
+ __name__ = "EuroshareEu"
+ __version__ = "0.01"
+ __type__ = "account"
+ __description__ = """euroshare.eu account plugin"""
+ __author_name__ = ("zoidberg")
+ __author_mail__ = ("zoidberg@mujmail.cz")
+
+ def loadAccountInfo(self, user, req):
+ self.relogin(user)
+ html = req.load("http://euroshare.eu/customer-zone/settings/")
+
+ found = re.search('id="input_expire_date" value="(\d+\.\d+\.\d+ \d+:\d+)"', html)
+ if found is None:
+ premium, validuntil = False, -1
+ else:
+ premium = True
+ validuntil = mktime(strptime(found.group(1), "%d.%m.%Y %H:%M"))
+
+ return {"validuntil": validuntil, "trafficleft": -1, "premium": premium}
+
+ def login(self, user, data, req):
+
+ html = req.load('http://euroshare.eu/customer-zone/login/', post={
+ "trvale": "1",
+ "login": user,
+ "password": data["password"]
+ }, decode=True)
+
+ if u">Nesprávne prihlasovacie meno alebo heslo" in html:
+ self.wrongPassword() \ No newline at end of file
diff --git a/module/plugins/accounts/FastshareCz.py b/module/plugins/accounts/FastshareCz.py
new file mode 100644
index 000000000..333ee3761
--- /dev/null
+++ b/module/plugins/accounts/FastshareCz.py
@@ -0,0 +1,52 @@
+# -*- coding: utf-8 -*-
+
+"""
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License,
+ or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, see <http://www.gnu.org/licenses/>.
+
+ @author: zoidberg
+"""
+
+import re
+from module.plugins.Account import Account
+from module.utils import parseFileSize
+
+class FastshareCz(Account):
+ __name__ = "FastshareCz"
+ __version__ = "0.01"
+ __type__ = "account"
+ __description__ = """fastshare.cz account plugin"""
+ __author_name__ = ("zoidberg")
+ __author_mail__ = ("zoidberg@mujmail.cz")
+
+ def loadAccountInfo(self, user, req):
+ html = req.load("http://www.fastshare.cz/user", decode = True)
+
+ found = re.search(r'Kredit: </td><td>(.+?)&nbsp;', html)
+ if found:
+ trafficleft = parseFileSize(found.group(1)) / 1024
+ premium = True if trafficleft else False
+ else:
+ trafficleft = None
+ premium = False
+
+ return {"validuntil": -1, "trafficleft": trafficleft, "premium": premium}
+
+ def login(self, user, data, req):
+ html = req.load('http://www.fastshare.cz/sql.php', post = {
+ "heslo": data['password'],
+ "login": user
+ }, decode = True)
+
+ if u'>Špatné uživatelské jméno nebo heslo.<' in html:
+ self.wrongPassword() \ No newline at end of file
diff --git a/module/plugins/accounts/FilebeerInfo.py b/module/plugins/accounts/FilebeerInfo.py
new file mode 100644
index 000000000..40ab70519
--- /dev/null
+++ b/module/plugins/accounts/FilebeerInfo.py
@@ -0,0 +1,57 @@
+# -*- coding: utf-8 -*-
+
+"""
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License,
+ or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, see <http://www.gnu.org/licenses/>.
+
+ @author: zoidberg
+"""
+
+import re
+from time import mktime, strptime
+from module.plugins.Account import Account
+from module.utils import parseFileSize
+
+class FilebeerInfo(Account):
+ __name__ = "FilebeerInfo"
+ __version__ = "0.02"
+ __type__ = "account"
+ __description__ = """filebeer.info account plugin"""
+ __author_name__ = ("zoidberg")
+ __author_mail__ = ("zoidberg@mujmail.cz")
+
+ VALID_UNTIL_PATTERN = r'Reverts To Free Account:\s</td>\s*<td>\s*(.*?)\s*</td>'
+
+ def loadAccountInfo(self, user, req):
+ html = req.load("http://filebeer.info/upgrade.php", decode = True)
+ premium = not 'Free User </td>' in html
+
+ validuntil = None
+ if premium:
+ try:
+ validuntil = mktime(strptime(re.search(self.VALID_UNTIL_PATTERN, html).group(1), "%d/%m/%Y %H:%M:%S"))
+ except Exception, e:
+ self.logError("Unable to parse account info", e)
+
+ return {"validuntil": validuntil, "trafficleft": -1, "premium": premium}
+
+ def login(self, user, data, req):
+ html = req.load('http://filebeer.info/login.php', post = {
+ "submit": 'Login',
+ "loginPassword": data['password'],
+ "loginUsername": user,
+ "submitme": '1'
+ }, decode = True)
+
+ if "<ul class='pageErrors'>" in html or ">Your username and password are invalid<" in html:
+ self.wrongPassword() \ No newline at end of file
diff --git a/module/plugins/accounts/FilerioCom.py b/module/plugins/accounts/FilerioCom.py
new file mode 100644
index 000000000..feacacaf5
--- /dev/null
+++ b/module/plugins/accounts/FilerioCom.py
@@ -0,0 +1,12 @@
+# -*- coding: utf-8 -*-
+from module.plugins.internal.XFSPAccount import XFSPAccount
+
+class FilerioCom(XFSPAccount):
+ __name__ = "FilerioCom"
+ __version__ = "0.01"
+ __type__ = "account"
+ __description__ = """FileRio.in account plugin"""
+ __author_name__ = ("zoidberg")
+ __author_mail__ = ("zoidberg@mujmail.cz")
+
+ MAIN_PAGE = "http://filerio.in/" \ No newline at end of file
diff --git a/module/plugins/accounts/FilesonicCom.py b/module/plugins/accounts/FilesonicCom.py
deleted file mode 100644
index 1b0104b2a..000000000
--- a/module/plugins/accounts/FilesonicCom.py
+++ /dev/null
@@ -1,71 +0,0 @@
-# -*- coding: utf-8 -*-
-
-"""
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License,
- or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See the GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, see <http://www.gnu.org/licenses/>.
-
- @author: RaNaN
-"""
-
-from time import mktime, strptime
-
-from module.plugins.Account import Account
-from module.common.json_layer import json_loads
-
-class FilesonicCom(Account):
- __name__ = "FilesonicCom"
- __version__ = "0.31"
- __type__ = "account"
- __description__ = """filesonic.com account plugin"""
- __author_name__ = ("RaNaN", "Paul King")
- __author_mail__ = ("RaNaN@pyload.org", "")
-
- API_URL = "http://api.filesonic.com"
-
- def getDomain(self, req):
- xml = req.load(self.API_URL + "/utility?method=getFilesonicDomainForCurrentIp&format=json",
- decode=True)
- return json_loads(xml)["FSApi_Utility"]["getFilesonicDomainForCurrentIp"]["response"]
-
- def loadAccountInfo(self, req):
- xml = req.load(self.API_URL + "/user?method=getInfo&format=json",
- post={"u": self.loginname,
- "p": self.password}, decode=True)
-
- self.logDebug("account status retrieved from api %s" % xml)
-
- json = json_loads(xml)
- if json["FSApi_User"]["getInfo"]["status"] != "success":
- self.logError(_("Invalid login retrieving user details"))
- return {"validuntil": -1, "trafficleft": -1, "premium": False}
- premium = json["FSApi_User"]["getInfo"]["response"]["users"]["user"]["is_premium"]
- if premium:
- validuntil = json["FSApi_User"]["getInfo"]["response"]["users"]["user"]["premium_expiration"]
- validuntil = int(mktime(strptime(validuntil, "%Y-%m-%d %H:%M:%S")))
- else:
- validuntil = -1
- return {"validuntil": validuntil, "trafficleft": -1, "premium": premium}
-
- def login(self, req):
- domain = self.getDomain(req)
-
- post_vars = {
- "email": self.loginname,
- "password": self.password,
- "rememberMe": 1
- }
- page = req.load("http://www%s/user/login" % domain, cookies=True, post=post_vars, decode=True)
-
- if "Provided password does not match." in page or "You must be logged in to view this page." in page:
- self.wrongPassword()
-
diff --git a/module/plugins/accounts/FshareVn.py b/module/plugins/accounts/FshareVn.py
index e51009f50..9b22cbafb 100644
--- a/module/plugins/accounts/FshareVn.py
+++ b/module/plugins/accounts/FshareVn.py
@@ -13,7 +13,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, see <http://www.gnu.org/licenses/>.
-
+
@author: zoidberg
"""
@@ -24,36 +24,39 @@ import re
class FshareVn(Account):
__name__ = "FshareVn"
- __version__ = "0.02"
+ __version__ = "0.04"
__type__ = "account"
__description__ = """fshare.vn account plugin"""
__author_name__ = ("zoidberg")
__author_mail__ = ("zoidberg@mujmail.cz")
-
+
VALID_UNTIL_PATTERN = ur'<dt>Thời hạn dùng:</dt>\s*<dd>([^<]+)</dd>'
- TRAFFIC_LEFT_PATTERN = ur'<dt>Bandwidth Còn Lại</dt>\s*<dd[^>]*>([0-9.]+) ([kKMG])B</dd>'
+ TRAFFIC_LEFT_PATTERN = ur'<dt>Tổng Dung Lượng Tài Khoản</dt>\s*<dd[^>]*>([0-9.]+) ([kKMG])B</dd>'
DIRECT_DOWNLOAD_PATTERN = ur'<input type="checkbox"\s*([^=>]*)[^>]*/>Kích hoạt download trực tiếp</dt>'
def loadAccountInfo(self, user, req):
- #self.relogin(user)
html = req.load("http://www.fshare.vn/account_info.php", decode = True)
-
found = re.search(self.VALID_UNTIL_PATTERN, html)
- validuntil = mktime(strptime(found.group(1), '%I:%M:%S %p %d-%m-%Y')) if found else 0
-
- found = re.search(self.TRAFFIC_LEFT_PATTERN, html)
- trafficleft = float(found.group(1)) * 1024 ** {'k': 0, 'K': 0, 'M': 1, 'G': 2}[found.group(2)] if found else 0
-
- return {"validuntil": validuntil, "trafficleft": trafficleft}
-
+ if found:
+ premium = True
+ validuntil = mktime(strptime(found.group(1), '%I:%M:%S %p %d-%m-%Y'))
+ found = re.search(self.TRAFFIC_LEFT_PATTERN, html)
+ trafficleft = float(found.group(1)) * 1024 ** {'k': 0, 'K': 0, 'M': 1, 'G': 2}[found.group(2)] if found else 0
+ else:
+ premium = False
+ validuntil = None
+ trafficleft = None
+
+ return {"validuntil": validuntil, "trafficleft": trafficleft, "premium": premium}
+
def login(self, user, data, req):
- req.http.c.setopt(REFERER, "https://www.fshare.vn/login.php")
-
+ req.http.c.setopt(REFERER, "https://www.fshare.vn/login.php")
+
html = req.load('https://www.fshare.vn/login.php', post = {
"login_password" : data['password'],
"login_useremail" : user,
"url_refe" : "https://www.fshare.vn/login.php"
}, referer = True, decode = True)
-
- if not '<img alt="VIP"' in html:
+
+ if not '<img alt="VIP"' in html:
self.wrongPassword()
diff --git a/module/plugins/accounts/Ftp.py b/module/plugins/accounts/Ftp.py
new file mode 100644
index 000000000..9c1081662
--- /dev/null
+++ b/module/plugins/accounts/Ftp.py
@@ -0,0 +1,13 @@
+# -*- coding: utf-8 -*-
+
+from module.plugins.Account import Account
+
+class Ftp(Account):
+ __name__ = "Ftp"
+ __version__ = "0.01"
+ __type__ = "account"
+ __description__ = """Ftp dummy account plugin"""
+ __author_name__ = ("zoidberg")
+ __author_mail__ = ("zoidberg@mujmail.cz")
+
+ login_timeout = info_threshold = 1000000 \ No newline at end of file
diff --git a/module/plugins/accounts/HellshareCz.py b/module/plugins/accounts/HellshareCz.py
index 8ed134f59..c7a918dec 100644
--- a/module/plugins/accounts/HellshareCz.py
+++ b/module/plugins/accounts/HellshareCz.py
@@ -19,16 +19,17 @@
from module.plugins.Account import Account
import re
+import time
class HellshareCz(Account):
__name__ = "HellshareCz"
- __version__ = "0.12"
+ __version__ = "0.14"
__type__ = "account"
__description__ = """hellshare.cz account plugin"""
__author_name__ = ("zoidberg")
__author_mail__ = ("zoidberg@mujmail.cz")
- CREDIT_LEFT_PATTERN = r'<div class="credit-link">\s*<table>\s*<tr>\s*<th>(\d+)</th>'
+ CREDIT_LEFT_PATTERN = r'<div class="credit-link">\s*<table>\s*<tr>\s*<th>(\d+|\d\d\.\d\d\.)</th>'
def loadAccountInfo(self, user, req):
self.relogin(user)
@@ -36,15 +37,45 @@ class HellshareCz(Account):
found = re.search(self.CREDIT_LEFT_PATTERN, html)
if found is None:
- credits = 0
+ trafficleft = None
+ validuntil = None
premium = False
else:
- credits = int(found.group(1)) * 1024
+ credit = found.group(1)
premium = True
+ try:
+ if "." in credit:
+ #Time-based account
+ vt = [int(x) for x in credit.split('.')[:2]]
+ lt = time.localtime()
+ year = lt.tm_year + int(vt[1] < lt.tm_mon or (vt[1] == lt.tm_mon and vt[0] < lt.tm_mday))
+ validuntil = time.mktime(time.strptime("%s%d 23:59:59" % (credit,year), "%d.%m.%Y %H:%M:%S"))
+ trafficleft = -1
+ else:
+ #Traffic-based account
+ trafficleft = int(credit) * 1024
+ validuntil = -1
+ except Exception, e:
+ self.logError('Unable to parse credit info', e)
+ validuntil = -1
+ trafficleft = -1
- return {"validuntil": -1, "trafficleft": credits, "premium": premium}
+ return {"validuntil": validuntil, "trafficleft": trafficleft, "premium": premium}
def login(self, user, data, req):
+ html = req.load('http://www.hellshare.com/')
+ if req.lastEffectiveURL != 'http://www.hellshare.com/':
+ #Switch to English
+ self.logDebug('Switch lang - URL: %s' % req.lastEffectiveURL)
+ json = req.load("%s?do=locRouter-show" % req.lastEffectiveURL)
+ hash = re.search(r"(--[0-9a-f]+-)", json).group(1)
+ self.logDebug('Switch lang - HASH: %s' % hash)
+ html = req.load('http://www.hellshare.com/%s/' % hash)
+
+ if re.search(self.CREDIT_LEFT_PATTERN, html):
+ self.logDebug('Already logged in')
+ return
+
html = req.load('http://www.hellshare.com/login?do=loginForm-submit', post={
"login": "Log in",
"password": data["password"],
diff --git a/module/plugins/accounts/Http.py b/module/plugins/accounts/Http.py
new file mode 100644
index 000000000..805d19900
--- /dev/null
+++ b/module/plugins/accounts/Http.py
@@ -0,0 +1,13 @@
+# -*- coding: utf-8 -*-
+
+from module.plugins.Account import Account
+
+class Http(Account):
+ __name__ = "Http"
+ __version__ = "0.01"
+ __type__ = "account"
+ __description__ = """Http dummy account plugin"""
+ __author_name__ = ("zoidberg")
+ __author_mail__ = ("zoidberg@mujmail.cz")
+
+ login_timeout = info_threshold = 1000000 \ No newline at end of file
diff --git a/module/plugins/accounts/MegauploadCom.py b/module/plugins/accounts/MegauploadCom.py
deleted file mode 100644
index ff4f5971c..000000000
--- a/module/plugins/accounts/MegauploadCom.py
+++ /dev/null
@@ -1,53 +0,0 @@
-# -*- coding: utf-8 -*-
-
-"""
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License,
- or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See the GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, see <http://www.gnu.org/licenses/>.
-
- @author: mkaay
-"""
-
-import re
-from time import time
-
-from module.plugins.Account import Account
-
-class MegauploadCom(Account):
- __name__ = "MegauploadCom"
- __version__ = "0.12"
- __type__ = "account"
- __description__ = """megaupload account plugin"""
- __author_name__ = ("RaNaN")
- __author_mail__ = ("RaNaN@pyload.org")
-
- def loadAccountInfo(self, user, req):
- page = req.load("http://www.megaupload.com/?c=account&setlang=en", decode = True)
-
- premium = False if r'<div class="account_txt">Regular' in page else True
- validuntil = -1
-
- if premium:
- found = re.search(r'class="account_txt">\s*(\d+)\s*(days|hours|minutes) remaining', page)
- if found:
- validuntil = time() + 60 * int(found.group(1)) * {"days": 1440, "hours": 60, "minutes": 1}[found.group(2)]
-
- if '<div class="account_txt" id="ddltxt"> Deactivated </div>' in page:
- self.core.log.warning(_("Activate direct Download in your MegaUpload Account"))
-
- return {"validuntil": validuntil, "trafficleft": -1, "premium": premium}
-
-
- def login(self, user, data, req):
- page = req.load("http://www.megaupload.com/?c=login&next=c%3Dpremium", post={ "username" : user, "password" : data["password"], "login" :"1"}, cookies=True)
- if "Username and password do not match" in page:
- self.wrongPassword()
diff --git a/module/plugins/accounts/OronCom.py b/module/plugins/accounts/OronCom.py
deleted file mode 100755
index 2c1d33162..000000000
--- a/module/plugins/accounts/OronCom.py
+++ /dev/null
@@ -1,56 +0,0 @@
-# -*- coding: utf-8 -*-
-
-"""
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License,
- or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See the GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, see <http://www.gnu.org/licenses/>.
-
- @author: DHMH
-"""
-
-from module.plugins.Account import Account
-import re
-from time import strptime, mktime
-from module.utils import formatSize, parseFileSize
-
-class OronCom(Account):
- __name__ = "OronCom"
- __version__ = "0.13"
- __type__ = "account"
- __description__ = """oron.com account plugin"""
- __author_name__ = ("DHMH")
- __author_mail__ = ("DHMH@pyload.org")
-
- def loadAccountInfo(self, req):
- req.load("http://oron.com/?op=change_lang&lang=german")
- src = req.load("http://oron.com/?op=my_account").replace("\n", "")
- validuntil = re.search(r"<td>Premiumaccount läuft bis:</td>\s*<td>(.*?)</td>", src)
- if validuntil:
- validuntil = validuntil.group(1)
- validuntil = int(mktime(strptime(validuntil, "%d %B %Y")))
- trafficleft = re.search(r'<td>Download Traffic verfügbar:</td>\s*<td>(.*?)</td>', src).group(1)
- self.logDebug("Oron left: " + formatSize(parseFileSize(trafficleft)))
- trafficleft = int(self.parseTraffic(trafficleft))
- premium = True
- else:
- validuntil = -1
- trafficleft = None
- premium = False
- tmp = {"validuntil": validuntil, "trafficleft": trafficleft, "premium" : premium}
- return tmp
-
- def login(self, req):
- req.load("http://oron.com/?op=change_lang&lang=german")
- page = req.load("http://oron.com/login", post={"login": self.loginname, "password": self.password, "op": "login"})
- if r'<b class="err">Login oder Passwort falsch</b>' in page:
- self.wrongPassword()
-
diff --git a/module/plugins/accounts/PremiumizeMe.py b/module/plugins/accounts/PremiumizeMe.py
index 768fcd783..1a446b842 100644
--- a/module/plugins/accounts/PremiumizeMe.py
+++ b/module/plugins/accounts/PremiumizeMe.py
@@ -4,7 +4,7 @@ from module.common.json_layer import json_loads
class PremiumizeMe(Account):
__name__ = "PremiumizeMe"
- __version__ = "0.1"
+ __version__ = "0.11"
__type__ = "account"
__description__ = """Premiumize.Me account plugin"""
@@ -15,10 +15,14 @@ class PremiumizeMe(Account):
# Get user data from premiumize.me
status = self.getAccountStatus(user, req)
+ self.logDebug(status)
# Parse account info
account_info = {"validuntil": float(status['result']['expires']),
- "trafficleft": status['result']['trafficleft_bytes'] / 1024}
+ "trafficleft": max(0, status['result']['trafficleft_bytes'] / 1024)}
+
+ if status['result']['type'] == 'free':
+ account_info['premium'] = False
return account_info
@@ -37,4 +41,4 @@ class PremiumizeMe(Account):
# Use premiumize.me API v1 (see https://secure.premiumize.me/?show=api) to retrieve account info and return the parsed json answer
answer = req.load("https://api.premiumize.me/pm-api/v1.php?method=accountstatus&params[login]=%s&params[pass]=%s" % (user, self.accounts[user]['password']))
return json_loads(answer)
- \ No newline at end of file
+
diff --git a/module/plugins/accounts/QuickshareCz.py b/module/plugins/accounts/QuickshareCz.py
new file mode 100644
index 000000000..94649cc43
--- /dev/null
+++ b/module/plugins/accounts/QuickshareCz.py
@@ -0,0 +1,53 @@
+# -*- coding: utf-8 -*-
+
+"""
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License,
+ or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, see <http://www.gnu.org/licenses/>.
+
+ @author: zoidberg
+"""
+
+import re
+from module.plugins.Account import Account
+from module.utils import parseFileSize
+
+class QuickshareCz(Account):
+ __name__ = "QuickshareCz"
+ __version__ = "0.01"
+ __type__ = "account"
+ __description__ = """quickshare.cz account plugin"""
+ __author_name__ = ("zoidberg")
+ __author_mail__ = ("zoidberg@mujmail.cz")
+
+ def loadAccountInfo(self, user, req):
+ html = req.load("http://www.quickshare.cz/premium", decode = True)
+
+ found = re.search(r'Stav kreditu: <strong>(.+?)</strong>', html)
+ if found:
+ trafficleft = parseFileSize(found.group(1)) / 1024
+ premium = True if trafficleft else False
+ else:
+ trafficleft = None
+ premium = False
+
+ return {"validuntil": -1, "trafficleft": trafficleft, "premium": premium}
+
+ def login(self, user, data, req):
+ html = req.load('http://www.quickshare.cz/html/prihlaseni_process.php', post = {
+ "akce": u'Přihlásit',
+ "heslo": data['password'],
+ "jmeno": user
+ }, decode = True)
+
+ if u'>Takový uživatel neexistuje.<' in html or u'>Špatné heslo.<' in html:
+ self.wrongPassword() \ No newline at end of file
diff --git a/module/plugins/accounts/RapidgatorNet.py b/module/plugins/accounts/RapidgatorNet.py
new file mode 100644
index 000000000..74825a0f9
--- /dev/null
+++ b/module/plugins/accounts/RapidgatorNet.py
@@ -0,0 +1,74 @@
+# -*- coding: utf-8 -*-
+
+"""
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License,
+ or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, see <http://www.gnu.org/licenses/>.
+
+ @author: zoidberg
+"""
+
+import re
+from module.plugins.Account import Account
+from module.utils import parseFileSize
+from module.common.json_layer import json_loads
+
+class RapidgatorNet(Account):
+ __name__ = "RapidgatorNet"
+ __version__ = "0.03"
+ __type__ = "account"
+ __description__ = """rapidgator.net account plugin"""
+ __author_name__ = ("zoidberg")
+ __author_mail__ = ("zoidberg@mujmail.cz")
+
+ API_URL = 'http://rapidgator.net/api/user'
+
+ def loadAccountInfo(self, user, req):
+ try:
+ sid = self.getAccountData(user).get('SID')
+ assert sid
+
+ json = req.load("%s/info?sid=%s" % (self.API_URL, sid))
+ self.logDebug("API:USERINFO", json)
+ json = json_loads(json)
+
+ if json['response_status'] == 200:
+ if "reset_in" in json['response']:
+ self.scheduleRefresh(user, json['response']['reset_in'])
+
+ return {"validuntil": json['response']['expire_date'],
+ "trafficleft": json['response']['traffic_left'] / 1024,
+ "premium": True}
+ else:
+ self.logError(json['response_details'])
+ except Exception, e:
+ self.logError(e)
+
+ return {"validuntil": None, "trafficleft": None, "premium": False}
+
+ def login(self, user, data, req):
+ try:
+ json = req.load('%s/login' % self.API_URL,
+ post = {"username": user,
+ "password": data['password']})
+ self.logDebug("API:LOGIN", json)
+ json = json_loads(json)
+
+ if json['response_status'] == 200:
+ data['SID'] = str(json['response']['session_id'])
+ return
+ else:
+ self.logError(json['response_details'])
+ except Exception, e:
+ self.logError(e)
+
+ self.wrongPassword() \ No newline at end of file
diff --git a/module/plugins/accounts/RarefileNet.py b/module/plugins/accounts/RarefileNet.py
new file mode 100644
index 000000000..57f293c55
--- /dev/null
+++ b/module/plugins/accounts/RarefileNet.py
@@ -0,0 +1,12 @@
+# -*- coding: utf-8 -*-
+from module.plugins.internal.XFSPAccount import XFSPAccount
+
+class RarefileNet(XFSPAccount):
+ __name__ = "RarefileNet"
+ __version__ = "0.01"
+ __type__ = "account"
+ __description__ = """RareFile.net account plugin"""
+ __author_name__ = ("zoidberg")
+ __author_mail__ = ("zoidberg@mujmail.cz")
+
+ MAIN_PAGE = "http://rarefile.in/" \ No newline at end of file
diff --git a/module/plugins/accounts/ReloadCc.py b/module/plugins/accounts/ReloadCc.py
new file mode 100644
index 000000000..e4cb32c42
--- /dev/null
+++ b/module/plugins/accounts/ReloadCc.py
@@ -0,0 +1,73 @@
+from module.plugins.Account import Account
+
+from module.common.json_layer import json_loads
+
+from module.network.HTTPRequest import BadHeader
+
+class ReloadCc(Account):
+ __name__ = "ReloadCc"
+ __version__ = "0.3"
+ __type__ = "account"
+ __description__ = """Reload.Cc account plugin"""
+
+ __author_name__ = ("Reload Team")
+ __author_mail__ = ("hello@reload.cc")
+
+ def loadAccountInfo(self, user, req):
+
+ # Get user data from reload.cc
+ status = self.getAccountStatus(user, req)
+
+ # Parse account info
+ account_info = {"validuntil": float(status['msg']['expires']),
+ "pwdhash": status['msg']['hash'],
+ "trafficleft": -1}
+
+ return account_info
+
+ def login(self, user, data, req):
+
+ # Get user data from reload.cc
+ status = self.getAccountStatus(user, req)
+
+ if not status:
+ raise Exception("There was an error upon logging in to Reload.cc!")
+
+ # Check if user and password are valid
+ if status['status'] != "ok":
+ self.wrongPassword()
+
+
+ def getAccountStatus(self, user, req):
+ # Use reload.cc API v1 to retrieve account info and return the parsed json answer
+ query_params = dict(
+ via='pyload',
+ v=1,
+ get_traffic='true',
+ user=user
+ )
+
+ try:
+ query_params.update(dict(hash=self.infos[user]['pwdhash']))
+ except Exception:
+ query_params.update(dict(pwd=self.accounts[user]['password']))
+
+ try:
+ answer = req.load("http://api.reload.cc/login", get=query_params)
+ except BadHeader, e:
+ if e.code == 400:
+ raise Exception("There was an unknown error within the Reload.cc plugin.")
+ elif e.code == 401:
+ self.wrongPassword()
+ elif e.code == 402:
+ self.expired(user)
+ elif e.code == 403:
+ raise Exception("Your account is disabled. Please contact the Reload.cc support!")
+ elif e.code == 409:
+ self.empty(user)
+ elif e.code == 503:
+ self.logInfo("Reload.cc is currently in maintenance mode! Please check again later.")
+ self.wrongPassword()
+ return None
+
+ return json_loads(answer)
diff --git a/module/plugins/accounts/Share76Com.py b/module/plugins/accounts/Share76Com.py
new file mode 100644
index 000000000..9c946ae50
--- /dev/null
+++ b/module/plugins/accounts/Share76Com.py
@@ -0,0 +1,11 @@
+# -*- coding: utf-8 -*-
+from module.plugins.internal.XFSPAccount import XFSPAccount
+
+class Share76Com(XFSPAccount):
+ __name__ = "Share76Com"
+ __version__ = "0.02"
+ __type__ = "account"
+ __description__ = """Share76.com account plugin"""
+ __author_name__ = ("me")
+
+ MAIN_PAGE = "http://Share76.com/"
diff --git a/module/plugins/accounts/ShareFilesCo.py b/module/plugins/accounts/ShareFilesCo.py
new file mode 100644
index 000000000..0d8ea6635
--- /dev/null
+++ b/module/plugins/accounts/ShareFilesCo.py
@@ -0,0 +1,12 @@
+# -*- coding: utf-8 -*-
+from module.plugins.internal.XFSPAccount import XFSPAccount
+
+class ShareFilesCo(XFSPAccount):
+ __name__ = "ShareFilesCo"
+ __version__ = "0.01"
+ __type__ = "account"
+ __description__ = """ShareFilesCo account plugin"""
+ __author_name__ = ("stickell")
+ __author_mail__ = ("l.stickell@yahoo.it")
+
+ MAIN_PAGE = "http://sharefiles.co/"
diff --git a/module/plugins/accounts/ShareRapidCom.py b/module/plugins/accounts/ShareRapidCom.py
index aad229475..f8043449c 100644
--- a/module/plugins/accounts/ShareRapidCom.py
+++ b/module/plugins/accounts/ShareRapidCom.py
@@ -1,24 +1,37 @@
# -*- coding: utf-8 -*-
import re
+from time import mktime, strptime
from module.plugins.Account import Account
class ShareRapidCom(Account):
__name__ = "ShareRapidCom"
- __version__ = "0.31"
+ __version__ = "0.32"
__type__ = "account"
__description__ = """ShareRapid account plugin"""
- __author_name__ = ("MikyWoW")
-
+ __author_name__ = ("MikyWoW", "zoidberg")
+
+ login_timeout = 60
+
def loadAccountInfo(self, user, req):
- src = req.load("http://share-rapid.com/mujucet/", cookies=True)
+ src = req.load("http://share-rapid.com/mujucet/", decode=True)
+
+ found = re.search(ur'<td>Max. počet paralelních stahování: </td><td>(\d+)', src)
+ if found:
+ data = self.getAccountData(user)
+ data["options"]["limitDL"] = [int(found.group(1))]
+
+ found = re.search(ur'<td>Paušální stahování aktivní. Vyprší </td><td><strong>(.*?)</strong>', src)
+ if found:
+ validuntil = mktime(strptime(found.group(1), "%d.%m.%Y - %H:%M"))
+ return {"premium": True, "trafficleft": -1, "validuntil": validuntil}
+
found = re.search(r'<tr><td>GB:</td><td>(.*?) GB', src)
if found:
- ret = float(found.group(1)) * (1 << 20)
- tmp = {"premium": True, "trafficleft": ret, "validuntil": -1}
- else:
- tmp = {"premium": False, "trafficleft": None, "validuntil": None}
- return tmp
+ trafficleft = float(found.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://share-rapid.com/prihlaseni/", cookies=True)
@@ -27,8 +40,8 @@ class ShareRapidCom(Account):
htm = htm[start+33:]
hashes = htm[0:32]
htm = req.load("http://share-rapid.com/prihlaseni/",
- post={"hash": hashes,"login": user, "pass1": data["password"],"remember": 0,
- "sbmt": "P%C5%99ihl%C3%A1sit"}, cookies=True)
-
- #if "Heslo:" in htm:
- # self.wrongPassword() \ No newline at end of file
+ post={"hash": hashes,
+ "login": user,
+ "pass1": data["password"],
+ "remember": 0,
+ "sbmt": u"Přihlásit"}, cookies=True) \ No newline at end of file
diff --git a/module/plugins/accounts/ShareonlineBiz.py b/module/plugins/accounts/ShareonlineBiz.py
index 4dd398d6d..fe2b412db 100644
--- a/module/plugins/accounts/ShareonlineBiz.py
+++ b/module/plugins/accounts/ShareonlineBiz.py
@@ -18,58 +18,39 @@
"""
from module.plugins.Account import Account
-from time import strptime, mktime
-import re
class ShareonlineBiz(Account):
__name__ = "ShareonlineBiz"
- __version__ = "0.3"
+ __version__ = "0.24"
__type__ = "account"
__description__ = """share-online.biz account plugin"""
- __author_name__ = ("mkaay")
- __author_mail__ = ("mkaay@mkaay.de")
-
- def getUserAPI(self, req):
- src = req.load("http://api.share-online.biz/account.php?username=%s&password=%s&act=userDetails" % (self.loginname, self.password))
+ __author_name__ = ("mkaay", "zoidberg")
+ __author_mail__ = ("mkaay@mkaay.de", "zoidberg@mujmail.cz")
+
+ def getUserAPI(self, user, req):
+ return req.load("http://api.share-online.biz/account.php",
+ {"username": user, "password": self.accounts[user]["password"], "act": "userDetails"})
+
+ def loadAccountInfo(self, user, req):
+ src = self.getUserAPI(user, req)
+
info = {}
for line in src.splitlines():
- key, value = line.split("=")
- info[key] = value
- return info
-
- def loadAccountInfo(self, user, req):
- try:
- info = self.getUserAPI(req)
- return {"validuntil": int(info["expire_date"]), "trafficleft": -1, "premium": not info["group"] == "Sammler"}
- except:
- pass
-
- #fallback
- src = req.load("http://www.share-online.biz/members.php?setlang=en")
- validuntil = re.search(r'<td align="left"><b>Package Expire Date:</b></td>\s*<td align="left">(\d+/\d+/\d+)</td>', src)
- if validuntil:
- validuntil = int(mktime(strptime(validuntil.group(1), "%m/%d/%y")))
- else:
- validuntil = -1
-
- acctype = re.search(r'<td align="left" ><b>Your Package:</b></td>\s*<td align="left">\s*<b>(.*?)</b>\s*</td>', src)
- if acctype:
- if acctype.group(1) == "Collector account (free)":
- premium = False
- else:
- premium = True
+ if "=" in line:
+ key, value = line.split("=")
+ info[key] = value
+ self.logDebug(info)
+
+ if "dl" in info and info["dl"].lower() != "not_available":
+ req.cj.setCookie("share-online.biz", "dl", info["dl"])
+ if "a" in info and info["a"].lower() != "not_available":
+ req.cj.setCookie("share-online.biz", "a", info["a"])
+
+ return {"validuntil": int(info["expire_date"]) if "expire_date" in info else -1,
+ "trafficleft": -1,
+ "premium": True if ("dl" in info or "a" in info) and (info["group"] != "Sammler") else False}
- tmp = {"validuntil": validuntil, "trafficleft": -1, "premium": premium}
- return tmp
-
def login(self, user, data, req):
- post_vars = {
- "act": "login",
- "location": "index.php",
- "dieseid": "",
- "user": user,
- "pass": data["password"],
- "login": "Login"
- }
- req.lastURL = "http://www.share-online.biz/"
- req.load("https://www.share-online.biz/login.php", cookies=True, post=post_vars)
+ src = self.getUserAPI(user, req)
+ if "EXCEPTION" in src:
+ self.wrongPassword() \ No newline at end of file
diff --git a/module/plugins/accounts/SpeedLoadOrg.py b/module/plugins/accounts/SpeedLoadOrg.py
new file mode 100644
index 000000000..4eb2b52de
--- /dev/null
+++ b/module/plugins/accounts/SpeedLoadOrg.py
@@ -0,0 +1,12 @@
+# -*- coding: utf-8 -*-
+from module.plugins.internal.XFSPAccount import XFSPAccount
+
+class SpeedLoadOrg(XFSPAccount):
+ __name__ = "SpeedLoadOrg"
+ __version__ = "0.01"
+ __type__ = "account"
+ __description__ = """SpeedLoadOrg account plugin"""
+ __author_name__ = ("stickell")
+ __author_mail__ = ("l.stickell@yahoo.it")
+
+ MAIN_PAGE = "http://speedload.org/"
diff --git a/module/plugins/accounts/UlozTo.py b/module/plugins/accounts/UlozTo.py
index 0c4ecda6a..6652c8b7c 100644
--- a/module/plugins/accounts/UlozTo.py
+++ b/module/plugins/accounts/UlozTo.py
@@ -5,19 +5,19 @@ import re
class UlozTo(Account):
__name__ = "UlozTo"
- __version__ = "0.03"
+ __version__ = "0.04"
__type__ = "account"
__description__ = """uloz.to account plugin"""
__author_name__ = ("zoidberg")
__author_mail__ = ("zoidberg@mujmail.cz")
- TRAFFIC_LEFT_PATTERN = r'<li class="menu-kredit"><a href="/kredit/" title="[^"]*?GB = ([0-9.]+) MB">'
+ TRAFFIC_LEFT_PATTERN = r'<li class="menu-kredit"><a href="http://www.ulozto.net/kredit" title="[^"]*?GB = ([0-9.]+) MB"'
def loadAccountInfo(self, user, req):
#this cookie gets lost somehow after each request
- self.phpsessid = req.cj.getCookie("PHPSESSID")
+ self.phpsessid = req.cj.getCookie("ULOSESSID")
html = req.load("http://www.ulozto.net/", decode = True)
- req.cj.setCookie("www.ulozto.net", "PHPSESSID", self.phpsessid)
+ req.cj.setCookie("www.ulozto.net", "ULOSESSID", self.phpsessid)
found = re.search(self.TRAFFIC_LEFT_PATTERN, html)
trafficleft = int(float(found.group(1).replace(' ','').replace(',','.')) * 1000 / 1.024) if found else 0
@@ -33,4 +33,4 @@ class UlozTo(Account):
}, decode = True)
if '<ul class="error">' in html:
- self.wrongPassword() \ No newline at end of file
+ self.wrongPassword()
diff --git a/module/plugins/accounts/UptoboxCom.py b/module/plugins/accounts/UptoboxCom.py
new file mode 100644
index 000000000..b07991817
--- /dev/null
+++ b/module/plugins/accounts/UptoboxCom.py
@@ -0,0 +1,12 @@
+# -*- coding: utf-8 -*-
+from module.plugins.internal.XFSPAccount import XFSPAccount
+
+class UptoboxCom(XFSPAccount):
+ __name__ = "UptoboxCom"
+ __version__ = "0.01"
+ __type__ = "account"
+ __description__ = """DDLStorage.com account plugin"""
+ __author_name__ = ("zoidberg")
+ __author_mail__ = ("zoidberg@mujmail.cz")
+
+ MAIN_PAGE = "http://uptobox.com/" \ No newline at end of file
diff --git a/module/plugins/accounts/WarserverCz.py b/module/plugins/accounts/WarserverCz.py
index b3cafdb5f..21961956b 100644
--- a/module/plugins/accounts/WarserverCz.py
+++ b/module/plugins/accounts/WarserverCz.py
@@ -17,17 +17,54 @@
@author: zoidberg
"""
-from module.plugins.accounts.CoolshareCz import CoolshareCz
+from module.plugins.Account import Account
import re
from module.utils import parseFileSize
from time import mktime, strptime
-class WarserverCz(CoolshareCz):
+class WarserverCz(Account):
__name__ = "WarserverCz"
- __version__ = "0.01"
+ __version__ = "0.02"
__type__ = "account"
__description__ = """Warserver.cz account plugin"""
__author_name__ = ("zoidberg")
__author_mail__ = ("zoidberg@mujmail.cz")
- DOMAIN = "http://www.warserver.cz" \ No newline at end of file
+ VALID_UNTIL_PATTERN = ur'<li>Neomezené stahování do: <strong>(.+?)<'
+ TRAFFIC_LEFT_PATTERN = ur'<li>Kredit: <strong>(.+?)<'
+
+ DOMAIN = "http://www.warserver.cz"
+
+ def loadAccountInfo(self, user, req):
+ html = req.load("%s/uzivatele/prehled" % self.DOMAIN, decode = True)
+
+ validuntil = trafficleft = None
+ premium = False
+
+ found = re.search(self.VALID_UNTIL_PATTERN, html)
+ if found:
+ self.logDebug("VALID_UNTIL", found.group(1))
+ try:
+ #validuntil = mktime(strptime(found.group(1), "%d %B %Y"))
+ premium = True
+ trafficleft = -1
+ except Exception, e:
+ self.logError(e)
+
+ found = re.search(self.TRAFFIC_LEFT_PATTERN, html)
+ if found:
+ self.logDebug("TRAFFIC_LEFT", found.group(1))
+ trafficleft = parseFileSize((found.group(1).replace("&thinsp;",""))) // 1024
+ premium = True if trafficleft > 1 << 18 else False
+
+ return ({"validuntil": validuntil, "trafficleft": trafficleft, "premium": premium})
+
+ def login(self, user, data, req):
+ html = req.load('%s/uzivatele/prihlaseni?do=prihlaseni-submit' % self.DOMAIN,
+ post = {"username": user,
+ "password": data['password'],
+ "send": u"Přihlásit"},
+ decode = True)
+
+ if '<p class="chyba">' in html:
+ self.wrongPassword() \ No newline at end of file