From 16af85004c84d0d6c626b4f8424ce9647669a0c1 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sun, 9 Jun 2013 18:10:22 +0200 Subject: moved everything from module to pyload --- pyload/plugins/accounts/AlldebridCom.py | 49 ++++++++++++++++ pyload/plugins/accounts/BayfilesCom.py | 51 +++++++++++++++++ pyload/plugins/accounts/BitshareCom.py | 44 +++++++++++++++ pyload/plugins/accounts/BoltsharingCom.py | 12 ++++ pyload/plugins/accounts/CramitIn.py | 12 ++++ pyload/plugins/accounts/CyberlockerCh.py | 31 ++++++++++ pyload/plugins/accounts/CzshareCom.py | 57 +++++++++++++++++++ pyload/plugins/accounts/DdlstorageCom.py | 12 ++++ pyload/plugins/accounts/DebridItaliaCom.py | 50 +++++++++++++++++ pyload/plugins/accounts/DepositfilesCom.py | 47 ++++++++++++++++ pyload/plugins/accounts/EasybytezCom.py | 73 ++++++++++++++++++++++++ pyload/plugins/accounts/EgoFilesCom.py | 40 +++++++++++++ pyload/plugins/accounts/EuroshareEu.py | 55 ++++++++++++++++++ pyload/plugins/accounts/FastshareCz.py | 54 ++++++++++++++++++ pyload/plugins/accounts/FilebeerInfo.py | 57 +++++++++++++++++++ pyload/plugins/accounts/FilecloudIo.py | 49 ++++++++++++++++ pyload/plugins/accounts/FilefactoryCom.py | 54 ++++++++++++++++++ pyload/plugins/accounts/FilejungleCom.py | 60 ++++++++++++++++++++ pyload/plugins/accounts/FilerioCom.py | 12 ++++ pyload/plugins/accounts/FilesMailRu.py | 41 ++++++++++++++ pyload/plugins/accounts/FileserveCom.py | 58 +++++++++++++++++++ pyload/plugins/accounts/FourSharedCom.py | 48 ++++++++++++++++ pyload/plugins/accounts/FreakshareCom.py | 51 +++++++++++++++++ pyload/plugins/accounts/FshareVn.py | 62 ++++++++++++++++++++ pyload/plugins/accounts/Ftp.py | 13 +++++ pyload/plugins/accounts/HellshareCz.py | 87 +++++++++++++++++++++++++++++ pyload/plugins/accounts/HellspyCz.py | 70 +++++++++++++++++++++++ pyload/plugins/accounts/HotfileCom.py | 86 ++++++++++++++++++++++++++++ pyload/plugins/accounts/Http.py | 13 +++++ pyload/plugins/accounts/MegasharesCom.py | 42 ++++++++++++++ pyload/plugins/accounts/MultiDebridCom.py | 47 ++++++++++++++++ pyload/plugins/accounts/MultishareCz.py | 58 +++++++++++++++++++ pyload/plugins/accounts/NetloadIn.py | 49 ++++++++++++++++ pyload/plugins/accounts/Premium4Me.py | 27 +++++++++ pyload/plugins/accounts/PremiumizeMe.py | 44 +++++++++++++++ pyload/plugins/accounts/QuickshareCz.py | 53 ++++++++++++++++++ pyload/plugins/accounts/RapidgatorNet.py | 74 ++++++++++++++++++++++++ pyload/plugins/accounts/RapidshareCom.py | 68 ++++++++++++++++++++++ pyload/plugins/accounts/RarefileNet.py | 12 ++++ pyload/plugins/accounts/RealdebridCom.py | 35 ++++++++++++ pyload/plugins/accounts/RehostTo.py | 37 ++++++++++++ pyload/plugins/accounts/ReloadCc.py | 73 ++++++++++++++++++++++++ pyload/plugins/accounts/RyushareCom.py | 18 ++++++ pyload/plugins/accounts/Share76Com.py | 11 ++++ pyload/plugins/accounts/ShareFilesCo.py | 12 ++++ pyload/plugins/accounts/ShareRapidCom.py | 47 ++++++++++++++++ pyload/plugins/accounts/ShareonlineBiz.py | 56 +++++++++++++++++++ pyload/plugins/accounts/SpeedLoadOrg.py | 12 ++++ pyload/plugins/accounts/StahnuTo.py | 49 ++++++++++++++++ pyload/plugins/accounts/TurbobitNet.py | 56 +++++++++++++++++++ pyload/plugins/accounts/UlozTo.py | 36 ++++++++++++ pyload/plugins/accounts/UploadedTo.py | 65 +++++++++++++++++++++ pyload/plugins/accounts/UploadheroCom.py | 35 ++++++++++++ pyload/plugins/accounts/UploadingCom.py | 52 +++++++++++++++++ pyload/plugins/accounts/UploadstationCom.py | 13 +++++ pyload/plugins/accounts/UptoboxCom.py | 12 ++++ pyload/plugins/accounts/WarserverCz.py | 70 +++++++++++++++++++++++ pyload/plugins/accounts/WuploadCom.py | 47 ++++++++++++++++ pyload/plugins/accounts/X7To.py | 66 ++++++++++++++++++++++ pyload/plugins/accounts/YibaishiwuCom.py | 51 +++++++++++++++++ pyload/plugins/accounts/ZeveraCom.py | 49 ++++++++++++++++ pyload/plugins/accounts/__init__.py | 0 62 files changed, 2724 insertions(+) create mode 100644 pyload/plugins/accounts/AlldebridCom.py create mode 100644 pyload/plugins/accounts/BayfilesCom.py create mode 100644 pyload/plugins/accounts/BitshareCom.py create mode 100644 pyload/plugins/accounts/BoltsharingCom.py create mode 100644 pyload/plugins/accounts/CramitIn.py create mode 100644 pyload/plugins/accounts/CyberlockerCh.py create mode 100644 pyload/plugins/accounts/CzshareCom.py create mode 100644 pyload/plugins/accounts/DdlstorageCom.py create mode 100644 pyload/plugins/accounts/DebridItaliaCom.py create mode 100644 pyload/plugins/accounts/DepositfilesCom.py create mode 100644 pyload/plugins/accounts/EasybytezCom.py create mode 100644 pyload/plugins/accounts/EgoFilesCom.py create mode 100644 pyload/plugins/accounts/EuroshareEu.py create mode 100644 pyload/plugins/accounts/FastshareCz.py create mode 100644 pyload/plugins/accounts/FilebeerInfo.py create mode 100644 pyload/plugins/accounts/FilecloudIo.py create mode 100644 pyload/plugins/accounts/FilefactoryCom.py create mode 100644 pyload/plugins/accounts/FilejungleCom.py create mode 100644 pyload/plugins/accounts/FilerioCom.py create mode 100644 pyload/plugins/accounts/FilesMailRu.py create mode 100644 pyload/plugins/accounts/FileserveCom.py create mode 100644 pyload/plugins/accounts/FourSharedCom.py create mode 100644 pyload/plugins/accounts/FreakshareCom.py create mode 100644 pyload/plugins/accounts/FshareVn.py create mode 100644 pyload/plugins/accounts/Ftp.py create mode 100644 pyload/plugins/accounts/HellshareCz.py create mode 100644 pyload/plugins/accounts/HellspyCz.py create mode 100644 pyload/plugins/accounts/HotfileCom.py create mode 100644 pyload/plugins/accounts/Http.py create mode 100644 pyload/plugins/accounts/MegasharesCom.py create mode 100644 pyload/plugins/accounts/MultiDebridCom.py create mode 100644 pyload/plugins/accounts/MultishareCz.py create mode 100755 pyload/plugins/accounts/NetloadIn.py create mode 100644 pyload/plugins/accounts/Premium4Me.py create mode 100644 pyload/plugins/accounts/PremiumizeMe.py create mode 100644 pyload/plugins/accounts/QuickshareCz.py create mode 100644 pyload/plugins/accounts/RapidgatorNet.py create mode 100644 pyload/plugins/accounts/RapidshareCom.py create mode 100644 pyload/plugins/accounts/RarefileNet.py create mode 100644 pyload/plugins/accounts/RealdebridCom.py create mode 100644 pyload/plugins/accounts/RehostTo.py create mode 100644 pyload/plugins/accounts/ReloadCc.py create mode 100644 pyload/plugins/accounts/RyushareCom.py create mode 100644 pyload/plugins/accounts/Share76Com.py create mode 100644 pyload/plugins/accounts/ShareFilesCo.py create mode 100644 pyload/plugins/accounts/ShareRapidCom.py create mode 100644 pyload/plugins/accounts/ShareonlineBiz.py create mode 100644 pyload/plugins/accounts/SpeedLoadOrg.py create mode 100644 pyload/plugins/accounts/StahnuTo.py create mode 100644 pyload/plugins/accounts/TurbobitNet.py create mode 100644 pyload/plugins/accounts/UlozTo.py create mode 100644 pyload/plugins/accounts/UploadedTo.py create mode 100644 pyload/plugins/accounts/UploadheroCom.py create mode 100644 pyload/plugins/accounts/UploadingCom.py create mode 100644 pyload/plugins/accounts/UploadstationCom.py create mode 100644 pyload/plugins/accounts/UptoboxCom.py create mode 100644 pyload/plugins/accounts/WarserverCz.py create mode 100644 pyload/plugins/accounts/WuploadCom.py create mode 100644 pyload/plugins/accounts/X7To.py create mode 100644 pyload/plugins/accounts/YibaishiwuCom.py create mode 100644 pyload/plugins/accounts/ZeveraCom.py create mode 100644 pyload/plugins/accounts/__init__.py (limited to 'pyload/plugins/accounts') diff --git a/pyload/plugins/accounts/AlldebridCom.py b/pyload/plugins/accounts/AlldebridCom.py new file mode 100644 index 000000000..baaa9d264 --- /dev/null +++ b/pyload/plugins/accounts/AlldebridCom.py @@ -0,0 +1,49 @@ +from module.plugins.Account import Account +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.21" + __type__ = "account" + __description__ = """AllDebrid.com account plugin""" + __author_name__ = ("Andy, Voigt") + __author_mail__ = ("spamsales@online.de") + + def loadAccountInfo(self, user, req): + 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: + 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 + account_info = {"validuntil": exp_time, "trafficleft": -1} + return account_info + + def login(self, user, data, req): + + 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() + + if "The password is not valid" in page: + self.wrongPassword() + + if "Invalid captcha" in page: + self.wrongPassword() diff --git a/pyload/plugins/accounts/BayfilesCom.py b/pyload/plugins/accounts/BayfilesCom.py new file mode 100644 index 000000000..0d036488b --- /dev/null +++ b/pyload/plugins/accounts/BayfilesCom.py @@ -0,0 +1,51 @@ +# -*- 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 . + + @author: zoidberg +""" + +from module.plugins.Account import Account +from module.common.json_layer import json_loads +import re +from time import time, mktime, strptime + +class BayfilesCom(Account): + __name__ = "BayfilesCom" + __version__ = "0.02" + __type__ = "account" + __description__ = """bayfiles.com account plugin""" + __author_name__ = ("zoidberg") + __author_mail__ = ("zoidberg@mujmail.cz") + + def loadAccountInfo(self, user, req): + for i in range(2): + response = json_loads(req.load("http://api.bayfiles.com/v1/account/info")) + self.logDebug(response) + if not response["error"]: + break + self.logWarning(response["error"]) + self.relogin() + + return {"premium": bool(response['premium']), \ + "trafficleft": -1, \ + "validuntil": response['expires'] if response['expires'] >= int(time()) else -1} + + def login(self, user, data, req): + response = json_loads(req.load("http://api.bayfiles.com/v1/account/login/%s/%s" % (user, data["password"]))) + self.logDebug(response) + if response["error"]: + self.logError(response["error"]) + self.wrongPassword() \ No newline at end of file diff --git a/pyload/plugins/accounts/BitshareCom.py b/pyload/plugins/accounts/BitshareCom.py new file mode 100644 index 000000000..a4f56e31c --- /dev/null +++ b/pyload/plugins/accounts/BitshareCom.py @@ -0,0 +1,44 @@ +# -*- 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 . + + @author: pking +""" + +from module.plugins.Account import Account + +class BitshareCom(Account): + __name__ = "BitshareCom" + __version__ = "0.11" + __type__ = "account" + __description__ = """Bitshare account plugin""" + __author_name__ = ("Paul King") + + def loadAccountInfo(self, user, req): + page = req.load("http://bitshare.com/mysettings.html") + + if "\"http://bitshare.com/myupgrade.html\">Free" in page: + return {"validuntil": -1, "trafficleft":-1, "premium": False} + + if not '' in page: + self.core.log.warning(_("Activate direct Download in your Bitshare Account")) + + return {"validuntil": -1, "trafficleft": -1, "premium": True} + + + def login(self, user, data, req): + page = req.load("http://bitshare.com/login.html", post={ "user" : user, "password" : data["password"], "submit" :"Login"}, cookies=True) + if "login" in req.lastEffectiveURL: + self.wrongPassword() diff --git a/pyload/plugins/accounts/BoltsharingCom.py b/pyload/plugins/accounts/BoltsharingCom.py new file mode 100644 index 000000000..678591d1d --- /dev/null +++ b/pyload/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/pyload/plugins/accounts/CramitIn.py b/pyload/plugins/accounts/CramitIn.py new file mode 100644 index 000000000..182c9d647 --- /dev/null +++ b/pyload/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/pyload/plugins/accounts/CyberlockerCh.py b/pyload/plugins/accounts/CyberlockerCh.py new file mode 100644 index 000000000..31e0c3e24 --- /dev/null +++ b/pyload/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/pyload/plugins/accounts/CzshareCom.py b/pyload/plugins/accounts/CzshareCom.py new file mode 100644 index 000000000..7b1a8edc5 --- /dev/null +++ b/pyload/plugins/accounts/CzshareCom.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 . + + @author: zoidberg +""" + +from time import mktime, strptime +import re + +from module.plugins.Account import Account + + +class CzshareCom(Account): + __name__ = "CzshareCom" + __version__ = "0.13" + __type__ = "account" + __description__ = """czshare.com account plugin""" + __author_name__ = ("zoidberg", "stickell") + __author_mail__ = ("zoidberg@mujmail.cz", "l.stickell@yahoo.it") + + CREDIT_LEFT_PATTERN = r'\s*([0-9 ,]+) (KiB|MiB|GiB)\s*([^<]*)\s*' + + def loadAccountInfo(self, user, req): + html = req.load("http://czshare.com/prehled_kreditu/") + + found = re.search(self.CREDIT_LEFT_PATTERN, html) + if not found: + return {"validuntil": 0, "trafficleft": 0} + else: + credits = float(found.group(1).replace(' ', '').replace(',', '.')) + credits = credits * 1024 ** {'KiB': 0, 'MiB': 1, 'GiB': 2}[found.group(2)] + validuntil = mktime(strptime(found.group(3), '%d.%m.%y %H:%M')) + return {"validuntil": validuntil, "trafficleft": credits} + + def login(self, user, data, req): + + html = req.load('https://czshare.com/index.php', post={ + "Prihlasit": "Prihlasit", + "login-password": data["password"], + "login-name": user + }) + + if '
. # +############################################################################ + +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[^|]+) \|" + + 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/pyload/plugins/accounts/DepositfilesCom.py b/pyload/plugins/accounts/DepositfilesCom.py new file mode 100644 index 000000000..b0730de8e --- /dev/null +++ b/pyload/plugins/accounts/DepositfilesCom.py @@ -0,0 +1,47 @@ +# -*- 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 . + + @author: mkaay +""" + +from module.plugins.Account import Account +import re +from time import strptime, mktime + +class DepositfilesCom(Account): + __name__ = "DepositfilesCom" + __version__ = "0.1" + __type__ = "account" + __description__ = """depositfiles.com account plugin""" + __author_name__ = ("mkaay") + __author_mail__ = ("mkaay@mkaay.de") + + def loadAccountInfo(self, user, req): + + src = req.load("http://depositfiles.com/de/gold/") + validuntil = re.search("noch den Gold-Zugriff: (.*?)
", src).group(1) + + validuntil = int(mktime(strptime(validuntil, "%Y-%m-%d %H:%M:%S"))) + + tmp = {"validuntil":validuntil, "trafficleft":-1} + return tmp + + def login(self, user, data, req): + + req.load("http://depositfiles.com/de/gold/payment.php") + src = req.load("http://depositfiles.com/de/login.php", get={"return": "/de/gold/payment.php"}, post={"login": user, "password": data["password"]}) + if r'
Sie haben eine falsche Benutzername-Passwort-Kombination verwendet.
' in src: + self.wrongPassword() diff --git a/pyload/plugins/accounts/EasybytezCom.py b/pyload/plugins/accounts/EasybytezCom.py new file mode 100644 index 000000000..ba7829b83 --- /dev/null +++ b/pyload/plugins/accounts/EasybytezCom.py @@ -0,0 +1,73 @@ +# -*- 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 . + + @author: zoidberg +""" + +from module.plugins.Account import Account +from module.plugins.internal.SimpleHoster import parseHtmlForm +import re +from module.utils import parseFileSize +from time import mktime, strptime + +class EasybytezCom(Account): + __name__ = "EasybytezCom" + __version__ = "0.02" + __type__ = "account" + __description__ = """EasyBytez.com account plugin""" + __author_name__ = ("zoidberg") + __author_mail__ = ("zoidberg@mujmail.cz") + + VALID_UNTIL_PATTERN = r'Premium account expire:([^<]+)' + TRAFFIC_LEFT_PATTERN = r'Traffic available today:(?P[^<]+)' + + def loadAccountInfo(self, user, req): + html = req.load("http://www.easybytez.com/?op=my_account", decode = True) + + validuntil = trafficleft = None + premium = False + + found = re.search(self.VALID_UNTIL_PATTERN, html) + if found: + premium = True + trafficleft = -1 + try: + self.logDebug(found.group(1)) + validuntil = mktime(strptime(found.group(1), "%d %B %Y")) + except Exception, e: + self.logError(e) + else: + found = re.search(self.TRAFFIC_LEFT_PATTERN, html) + if found: + trafficleft = found.group(1) + if "Unlimited" in trafficleft: + premium = True + else: + trafficleft = parseFileSize(trafficleft) / 1024 + + return ({"validuntil": validuntil, "trafficleft": trafficleft, "premium": premium}) + + def login(self, user, data, req): + html = req.load('http://www.easybytez.com/login.html', decode = True) + action, inputs = parseHtmlForm('name="FL"', html) + inputs.update({"login": user, + "password": data['password'], + "redirect": "http://www.easybytez.com/"}) + + html = req.load(action, post = inputs, decode = True) + + if 'Incorrect Login or Password' in html or '>Error<' in html: + self.wrongPassword() \ No newline at end of file diff --git a/pyload/plugins/accounts/EgoFilesCom.py b/pyload/plugins/accounts/EgoFilesCom.py new file mode 100644 index 000000000..da1ed03ad --- /dev/null +++ b/pyload/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 = '
\s*Premium: (?P

[^/]*) / Traffic left: (?P[\d.]*) (?P\w*)\s*\\n\s*
' + + 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/pyload/plugins/accounts/EuroshareEu.py b/pyload/plugins/accounts/EuroshareEu.py new file mode 100644 index 000000000..42967d975 --- /dev/null +++ b/pyload/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 . + + @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/pyload/plugins/accounts/FastshareCz.py b/pyload/plugins/accounts/FastshareCz.py new file mode 100644 index 000000000..69bbb0827 --- /dev/null +++ b/pyload/plugins/accounts/FastshareCz.py @@ -0,0 +1,54 @@ +# -*- 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 . + + @author: zoidberg +""" + +import re +from module.plugins.Account import Account +from module.utils import parseFileSize + + +class FastshareCz(Account): + __name__ = "FastshareCz" + __version__ = "0.02" + __type__ = "account" + __description__ = """fastshare.cz account plugin""" + __author_name__ = ("zoidberg", "stickell") + __author_mail__ = ("zoidberg@mujmail.cz", "l.stickell@yahoo.it") + + def loadAccountInfo(self, user, req): + html = req.load("http://www.fastshare.cz/user", decode=True) + + found = re.search(r'(?:Kredit|Credit)\s*: (.+?) ', 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): + req.load('http://www.fastshare.cz/login') # Do not remove or it will not login + 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/pyload/plugins/accounts/FilebeerInfo.py b/pyload/plugins/accounts/FilebeerInfo.py new file mode 100644 index 000000000..40ab70519 --- /dev/null +++ b/pyload/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 . + + @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\s*\s*(.*?)\s*' + + def loadAccountInfo(self, user, req): + html = req.load("http://filebeer.info/upgrade.php", decode = True) + premium = not 'Free User ' 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 "

    " in html or ">Your username and password are invalid<" in html: + self.wrongPassword() \ No newline at end of file diff --git a/pyload/plugins/accounts/FilecloudIo.py b/pyload/plugins/accounts/FilecloudIo.py new file mode 100644 index 000000000..cf9f92209 --- /dev/null +++ b/pyload/plugins/accounts/FilecloudIo.py @@ -0,0 +1,49 @@ +# -*- 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 . + + @author: zoidberg +""" + +from module.plugins.Account import Account + +class FilecloudIo(Account): + __name__ = "FilecloudIo" + __version__ = "0.01" + __type__ = "account" + __description__ = """FilecloudIo account plugin""" + __author_name__ = ("zoidberg") + __author_mail__ = ("zoidberg@mujmail.cz") + + def loadAccountInfo(self, user, req): + return ({"validuntil": -1, "trafficleft": -1, "premium": False}) + + def login(self, user, data, req): + req.cj.setCookie("secure.filecloud.io", "lang", "en") + html = req.load('https://secure.filecloud.io/user-login.html') + + if not hasattr(self, "form_data"): + self.form_data = {} + + self.form_data["username"] = user + self.form_data["password"] = data['password'] + + html = req.load('https://secure.filecloud.io/user-login_p.html', + post = self.form_data, + multipart = True) + + self.logged_in = True if "you have successfully logged in - filecloud.io" in html else False + self.form_data = {} + \ No newline at end of file diff --git a/pyload/plugins/accounts/FilefactoryCom.py b/pyload/plugins/accounts/FilefactoryCom.py new file mode 100644 index 000000000..8e163e2f6 --- /dev/null +++ b/pyload/plugins/accounts/FilefactoryCom.py @@ -0,0 +1,54 @@ +# -*- 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 . + + @author: zoidberg +""" + +from module.plugins.Account import Account +import re +from time import mktime, strptime + +class FilefactoryCom(Account): + __name__ = "FilefactoryCom" + __version__ = "0.13" + __type__ = "account" + __description__ = """filefactory.com account plugin""" + __author_name__ = ("zoidberg", "stickell") + __author_mail__ = ("zoidberg@mujmail.cz", "l.stickell@yahoo.it") + + ACCOUNT_INFO_PATTERN = r'