From 43e6a6376625ac73067403ddae3b45a80618d6c8 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 3 Oct 2014 19:58:02 +0200 Subject: Rename accounts directory to account --- pyload/plugins/account/AlldebridCom.py | 58 +++++++++++++++++++ pyload/plugins/account/BayfilesCom.py | 36 ++++++++++++ pyload/plugins/account/BitshareCom.py | 31 +++++++++++ pyload/plugins/account/CramitIn.py | 15 +++++ pyload/plugins/account/CyberlockerCh.py | 35 ++++++++++++ pyload/plugins/account/CzshareCom.py | 41 ++++++++++++++ pyload/plugins/account/DebridItaliaCom.py | 36 ++++++++++++ pyload/plugins/account/DepositfilesCom.py | 32 +++++++++++ pyload/plugins/account/DevhostSt.py | 49 ++++++++++++++++ pyload/plugins/account/DevhostStFolder.py | 29 ++++++++++ pyload/plugins/account/DropboxCom.py | 42 ++++++++++++++ pyload/plugins/account/EasybytezCom.py | 69 +++++++++++++++++++++++ pyload/plugins/account/EgoFilesCom.py | 44 +++++++++++++++ pyload/plugins/account/EuroshareEu.py | 41 ++++++++++++++ pyload/plugins/account/FastixRu.py | 36 ++++++++++++ pyload/plugins/account/FastshareCz.py | 41 ++++++++++++++ pyload/plugins/account/File4safeCom.py | 18 ++++++ pyload/plugins/account/FilecloudIo.py | 57 +++++++++++++++++++ pyload/plugins/account/FilefactoryCom.py | 46 +++++++++++++++ pyload/plugins/account/FilejungleCom.py | 47 ++++++++++++++++ pyload/plugins/account/FilerNet.py | 49 ++++++++++++++++ pyload/plugins/account/FilerioCom.py | 15 +++++ pyload/plugins/account/FilesMailRu.py | 27 +++++++++ pyload/plugins/account/FileserveCom.py | 43 +++++++++++++++ pyload/plugins/account/FourSharedCom.py | 31 +++++++++++ pyload/plugins/account/FreakshareCom.py | 39 +++++++++++++ pyload/plugins/account/FreeWayMe.py | 52 +++++++++++++++++ pyload/plugins/account/FshareVn.py | 59 ++++++++++++++++++++ pyload/plugins/account/Ftp.py | 16 ++++++ pyload/plugins/account/HellshareCz.py | 74 +++++++++++++++++++++++++ pyload/plugins/account/HotfileCom.py | 74 +++++++++++++++++++++++++ pyload/plugins/account/Http.py | 16 ++++++ pyload/plugins/account/KingfilesNet.py | 86 +++++++++++++++++++++++++++++ pyload/plugins/account/LetitbitNet.py | 33 +++++++++++ pyload/plugins/account/LinksnappyCom.py | 49 ++++++++++++++++ pyload/plugins/account/MegaDebridEu.py | 37 +++++++++++++ pyload/plugins/account/MegasharesCom.py | 46 +++++++++++++++ pyload/plugins/account/MovReelCom.py | 21 +++++++ pyload/plugins/account/MultishareCz.py | 44 +++++++++++++++ pyload/plugins/account/MyfastfileCom.py | 34 ++++++++++++ pyload/plugins/account/NetloadIn.py | 38 +++++++++++++ pyload/plugins/account/OboomCom.py | 53 ++++++++++++++++++ pyload/plugins/account/OneFichierCom.py | 48 ++++++++++++++++ pyload/plugins/account/OverLoadMe.py | 35 ++++++++++++ pyload/plugins/account/PremiumTo.py | 30 ++++++++++ pyload/plugins/account/PremiumizeMe.py | 46 +++++++++++++++ pyload/plugins/account/QuickshareCz.py | 39 +++++++++++++ pyload/plugins/account/RPNetBiz.py | 49 ++++++++++++++++ pyload/plugins/account/RapidgatorNet.py | 56 +++++++++++++++++++ pyload/plugins/account/RapidshareCom.py | 54 ++++++++++++++++++ pyload/plugins/account/RarefileNet.py | 15 +++++ pyload/plugins/account/RealdebridCom.py | 35 ++++++++++++ pyload/plugins/account/RehostTo.py | 37 +++++++++++++ pyload/plugins/account/RyushareCom.py | 23 ++++++++ pyload/plugins/account/ShareRapidCom.py | 52 +++++++++++++++++ pyload/plugins/account/ShareonlineBiz.py | 42 ++++++++++++++ pyload/plugins/account/SimplyPremiumCom.py | 45 +++++++++++++++ pyload/plugins/account/SimplydebridCom.py | 33 +++++++++++ pyload/plugins/account/StahnuTo.py | 34 ++++++++++++ pyload/plugins/account/TurbobitNet.py | 41 ++++++++++++++ pyload/plugins/account/TusfilesNet.py | 69 +++++++++++++++++++++++ pyload/plugins/account/UlozTo.py | 45 +++++++++++++++ pyload/plugins/account/UnrestrictLi.py | 43 +++++++++++++++ pyload/plugins/account/UploadedTo.py | 53 ++++++++++++++++++ pyload/plugins/account/UploadheroCom.py | 40 ++++++++++++++ pyload/plugins/account/UploadingCom.py | 40 ++++++++++++++ pyload/plugins/account/UptoboxCom.py | 17 ++++++ pyload/plugins/account/YibaishiwuCom.py | 38 +++++++++++++ pyload/plugins/account/ZeveraCom.py | 54 ++++++++++++++++++ pyload/plugins/account/__init__.py | 0 pyload/plugins/accounts/AlldebridCom.py | 58 ------------------- pyload/plugins/accounts/BayfilesCom.py | 36 ------------ pyload/plugins/accounts/BitshareCom.py | 31 ----------- pyload/plugins/accounts/CramitIn.py | 15 ----- pyload/plugins/accounts/CyberlockerCh.py | 35 ------------ pyload/plugins/accounts/CzshareCom.py | 41 -------------- pyload/plugins/accounts/DebridItaliaCom.py | 36 ------------ pyload/plugins/accounts/DepositfilesCom.py | 32 ----------- pyload/plugins/accounts/DevhostSt.py | 49 ---------------- pyload/plugins/accounts/DevhostStFolder.py | 29 ---------- pyload/plugins/accounts/DropboxCom.py | 42 -------------- pyload/plugins/accounts/EasybytezCom.py | 69 ----------------------- pyload/plugins/accounts/EgoFilesCom.py | 44 --------------- pyload/plugins/accounts/EuroshareEu.py | 41 -------------- pyload/plugins/accounts/FastixRu.py | 36 ------------ pyload/plugins/accounts/FastshareCz.py | 41 -------------- pyload/plugins/accounts/File4safeCom.py | 18 ------ pyload/plugins/accounts/FilecloudIo.py | 57 ------------------- pyload/plugins/accounts/FilefactoryCom.py | 46 --------------- pyload/plugins/accounts/FilejungleCom.py | 47 ---------------- pyload/plugins/accounts/FilerNet.py | 49 ---------------- pyload/plugins/accounts/FilerioCom.py | 15 ----- pyload/plugins/accounts/FilesMailRu.py | 27 --------- pyload/plugins/accounts/FileserveCom.py | 43 --------------- pyload/plugins/accounts/FourSharedCom.py | 31 ----------- pyload/plugins/accounts/FreakshareCom.py | 39 ------------- pyload/plugins/accounts/FreeWayMe.py | 52 ----------------- pyload/plugins/accounts/FshareVn.py | 59 -------------------- pyload/plugins/accounts/Ftp.py | 16 ------ pyload/plugins/accounts/HellshareCz.py | 74 ------------------------- pyload/plugins/accounts/HotfileCom.py | 74 ------------------------- pyload/plugins/accounts/Http.py | 16 ------ pyload/plugins/accounts/KingfilesNet.py | 86 ----------------------------- pyload/plugins/accounts/LetitbitNet.py | 33 ----------- pyload/plugins/accounts/LinksnappyCom.py | 49 ---------------- pyload/plugins/accounts/MegaDebridEu.py | 37 ------------- pyload/plugins/accounts/MegasharesCom.py | 46 --------------- pyload/plugins/accounts/MovReelCom.py | 21 ------- pyload/plugins/accounts/MultishareCz.py | 44 --------------- pyload/plugins/accounts/MyfastfileCom.py | 34 ------------ pyload/plugins/accounts/NetloadIn.py | 38 ------------- pyload/plugins/accounts/OboomCom.py | 53 ------------------ pyload/plugins/accounts/OneFichierCom.py | 48 ---------------- pyload/plugins/accounts/OverLoadMe.py | 35 ------------ pyload/plugins/accounts/PremiumTo.py | 30 ---------- pyload/plugins/accounts/PremiumizeMe.py | 46 --------------- pyload/plugins/accounts/QuickshareCz.py | 39 ------------- pyload/plugins/accounts/RPNetBiz.py | 49 ---------------- pyload/plugins/accounts/RapidgatorNet.py | 56 ------------------- pyload/plugins/accounts/RapidshareCom.py | 54 ------------------ pyload/plugins/accounts/RarefileNet.py | 15 ----- pyload/plugins/accounts/RealdebridCom.py | 35 ------------ pyload/plugins/accounts/RehostTo.py | 37 ------------- pyload/plugins/accounts/RyushareCom.py | 23 -------- pyload/plugins/accounts/ShareRapidCom.py | 52 ----------------- pyload/plugins/accounts/ShareonlineBiz.py | 42 -------------- pyload/plugins/accounts/SimplyPremiumCom.py | 45 --------------- pyload/plugins/accounts/SimplydebridCom.py | 33 ----------- pyload/plugins/accounts/StahnuTo.py | 34 ------------ pyload/plugins/accounts/TurbobitNet.py | 41 -------------- pyload/plugins/accounts/TusfilesNet.py | 69 ----------------------- pyload/plugins/accounts/UlozTo.py | 45 --------------- pyload/plugins/accounts/UnrestrictLi.py | 43 --------------- pyload/plugins/accounts/UploadedTo.py | 53 ------------------ pyload/plugins/accounts/UploadheroCom.py | 40 -------------- pyload/plugins/accounts/UploadingCom.py | 40 -------------- pyload/plugins/accounts/UptoboxCom.py | 17 ------ pyload/plugins/accounts/YibaishiwuCom.py | 38 ------------- pyload/plugins/accounts/ZeveraCom.py | 54 ------------------ pyload/plugins/accounts/__init__.py | 0 140 files changed, 2852 insertions(+), 2852 deletions(-) create mode 100644 pyload/plugins/account/AlldebridCom.py create mode 100644 pyload/plugins/account/BayfilesCom.py create mode 100644 pyload/plugins/account/BitshareCom.py create mode 100644 pyload/plugins/account/CramitIn.py create mode 100644 pyload/plugins/account/CyberlockerCh.py create mode 100644 pyload/plugins/account/CzshareCom.py create mode 100644 pyload/plugins/account/DebridItaliaCom.py create mode 100644 pyload/plugins/account/DepositfilesCom.py create mode 100644 pyload/plugins/account/DevhostSt.py create mode 100644 pyload/plugins/account/DevhostStFolder.py create mode 100644 pyload/plugins/account/DropboxCom.py create mode 100644 pyload/plugins/account/EasybytezCom.py create mode 100644 pyload/plugins/account/EgoFilesCom.py create mode 100644 pyload/plugins/account/EuroshareEu.py create mode 100644 pyload/plugins/account/FastixRu.py create mode 100644 pyload/plugins/account/FastshareCz.py create mode 100644 pyload/plugins/account/File4safeCom.py create mode 100644 pyload/plugins/account/FilecloudIo.py create mode 100644 pyload/plugins/account/FilefactoryCom.py create mode 100644 pyload/plugins/account/FilejungleCom.py create mode 100644 pyload/plugins/account/FilerNet.py create mode 100644 pyload/plugins/account/FilerioCom.py create mode 100644 pyload/plugins/account/FilesMailRu.py create mode 100644 pyload/plugins/account/FileserveCom.py create mode 100644 pyload/plugins/account/FourSharedCom.py create mode 100644 pyload/plugins/account/FreakshareCom.py create mode 100644 pyload/plugins/account/FreeWayMe.py create mode 100644 pyload/plugins/account/FshareVn.py create mode 100644 pyload/plugins/account/Ftp.py create mode 100644 pyload/plugins/account/HellshareCz.py create mode 100644 pyload/plugins/account/HotfileCom.py create mode 100644 pyload/plugins/account/Http.py create mode 100644 pyload/plugins/account/KingfilesNet.py create mode 100644 pyload/plugins/account/LetitbitNet.py create mode 100644 pyload/plugins/account/LinksnappyCom.py create mode 100644 pyload/plugins/account/MegaDebridEu.py create mode 100644 pyload/plugins/account/MegasharesCom.py create mode 100644 pyload/plugins/account/MovReelCom.py create mode 100644 pyload/plugins/account/MultishareCz.py create mode 100644 pyload/plugins/account/MyfastfileCom.py create mode 100644 pyload/plugins/account/NetloadIn.py create mode 100644 pyload/plugins/account/OboomCom.py create mode 100644 pyload/plugins/account/OneFichierCom.py create mode 100644 pyload/plugins/account/OverLoadMe.py create mode 100644 pyload/plugins/account/PremiumTo.py create mode 100644 pyload/plugins/account/PremiumizeMe.py create mode 100644 pyload/plugins/account/QuickshareCz.py create mode 100644 pyload/plugins/account/RPNetBiz.py create mode 100644 pyload/plugins/account/RapidgatorNet.py create mode 100644 pyload/plugins/account/RapidshareCom.py create mode 100644 pyload/plugins/account/RarefileNet.py create mode 100644 pyload/plugins/account/RealdebridCom.py create mode 100644 pyload/plugins/account/RehostTo.py create mode 100644 pyload/plugins/account/RyushareCom.py create mode 100644 pyload/plugins/account/ShareRapidCom.py create mode 100644 pyload/plugins/account/ShareonlineBiz.py create mode 100644 pyload/plugins/account/SimplyPremiumCom.py create mode 100644 pyload/plugins/account/SimplydebridCom.py create mode 100644 pyload/plugins/account/StahnuTo.py create mode 100644 pyload/plugins/account/TurbobitNet.py create mode 100644 pyload/plugins/account/TusfilesNet.py create mode 100644 pyload/plugins/account/UlozTo.py create mode 100644 pyload/plugins/account/UnrestrictLi.py create mode 100644 pyload/plugins/account/UploadedTo.py create mode 100644 pyload/plugins/account/UploadheroCom.py create mode 100644 pyload/plugins/account/UploadingCom.py create mode 100644 pyload/plugins/account/UptoboxCom.py create mode 100644 pyload/plugins/account/YibaishiwuCom.py create mode 100644 pyload/plugins/account/ZeveraCom.py create mode 100644 pyload/plugins/account/__init__.py delete mode 100644 pyload/plugins/accounts/AlldebridCom.py delete mode 100644 pyload/plugins/accounts/BayfilesCom.py delete mode 100644 pyload/plugins/accounts/BitshareCom.py delete mode 100644 pyload/plugins/accounts/CramitIn.py delete mode 100644 pyload/plugins/accounts/CyberlockerCh.py delete mode 100644 pyload/plugins/accounts/CzshareCom.py delete mode 100644 pyload/plugins/accounts/DebridItaliaCom.py delete mode 100644 pyload/plugins/accounts/DepositfilesCom.py delete mode 100644 pyload/plugins/accounts/DevhostSt.py delete mode 100644 pyload/plugins/accounts/DevhostStFolder.py delete mode 100644 pyload/plugins/accounts/DropboxCom.py delete mode 100644 pyload/plugins/accounts/EasybytezCom.py delete mode 100644 pyload/plugins/accounts/EgoFilesCom.py delete mode 100644 pyload/plugins/accounts/EuroshareEu.py delete mode 100644 pyload/plugins/accounts/FastixRu.py delete mode 100644 pyload/plugins/accounts/FastshareCz.py delete mode 100644 pyload/plugins/accounts/File4safeCom.py delete mode 100644 pyload/plugins/accounts/FilecloudIo.py delete mode 100644 pyload/plugins/accounts/FilefactoryCom.py delete mode 100644 pyload/plugins/accounts/FilejungleCom.py delete mode 100644 pyload/plugins/accounts/FilerNet.py delete mode 100644 pyload/plugins/accounts/FilerioCom.py delete mode 100644 pyload/plugins/accounts/FilesMailRu.py delete mode 100644 pyload/plugins/accounts/FileserveCom.py delete mode 100644 pyload/plugins/accounts/FourSharedCom.py delete mode 100644 pyload/plugins/accounts/FreakshareCom.py delete mode 100644 pyload/plugins/accounts/FreeWayMe.py delete mode 100644 pyload/plugins/accounts/FshareVn.py delete mode 100644 pyload/plugins/accounts/Ftp.py delete mode 100644 pyload/plugins/accounts/HellshareCz.py delete mode 100644 pyload/plugins/accounts/HotfileCom.py delete mode 100644 pyload/plugins/accounts/Http.py delete mode 100644 pyload/plugins/accounts/KingfilesNet.py delete mode 100644 pyload/plugins/accounts/LetitbitNet.py delete mode 100644 pyload/plugins/accounts/LinksnappyCom.py delete mode 100644 pyload/plugins/accounts/MegaDebridEu.py delete mode 100644 pyload/plugins/accounts/MegasharesCom.py delete mode 100644 pyload/plugins/accounts/MovReelCom.py delete mode 100644 pyload/plugins/accounts/MultishareCz.py delete mode 100644 pyload/plugins/accounts/MyfastfileCom.py delete mode 100644 pyload/plugins/accounts/NetloadIn.py delete mode 100644 pyload/plugins/accounts/OboomCom.py delete mode 100644 pyload/plugins/accounts/OneFichierCom.py delete mode 100644 pyload/plugins/accounts/OverLoadMe.py delete mode 100644 pyload/plugins/accounts/PremiumTo.py delete mode 100644 pyload/plugins/accounts/PremiumizeMe.py delete mode 100644 pyload/plugins/accounts/QuickshareCz.py delete mode 100644 pyload/plugins/accounts/RPNetBiz.py delete mode 100644 pyload/plugins/accounts/RapidgatorNet.py delete mode 100644 pyload/plugins/accounts/RapidshareCom.py delete mode 100644 pyload/plugins/accounts/RarefileNet.py delete mode 100644 pyload/plugins/accounts/RealdebridCom.py delete mode 100644 pyload/plugins/accounts/RehostTo.py delete mode 100644 pyload/plugins/accounts/RyushareCom.py delete mode 100644 pyload/plugins/accounts/ShareRapidCom.py delete mode 100644 pyload/plugins/accounts/ShareonlineBiz.py delete mode 100644 pyload/plugins/accounts/SimplyPremiumCom.py delete mode 100644 pyload/plugins/accounts/SimplydebridCom.py delete mode 100644 pyload/plugins/accounts/StahnuTo.py delete mode 100644 pyload/plugins/accounts/TurbobitNet.py delete mode 100644 pyload/plugins/accounts/TusfilesNet.py delete mode 100644 pyload/plugins/accounts/UlozTo.py delete mode 100644 pyload/plugins/accounts/UnrestrictLi.py delete mode 100644 pyload/plugins/accounts/UploadedTo.py delete mode 100644 pyload/plugins/accounts/UploadheroCom.py delete mode 100644 pyload/plugins/accounts/UploadingCom.py delete mode 100644 pyload/plugins/accounts/UptoboxCom.py delete mode 100644 pyload/plugins/accounts/YibaishiwuCom.py delete mode 100644 pyload/plugins/accounts/ZeveraCom.py delete mode 100644 pyload/plugins/accounts/__init__.py (limited to 'pyload/plugins') diff --git a/pyload/plugins/account/AlldebridCom.py b/pyload/plugins/account/AlldebridCom.py new file mode 100644 index 000000000..71905d8ef --- /dev/null +++ b/pyload/plugins/account/AlldebridCom.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- + +import re +import xml.dom.minidom as dom + +from time import time +from urllib import urlencode + +from BeautifulSoup import BeautifulSoup + +from pyload.plugins.base.Account import Account + + +class AlldebridCom(Account): + __name__ = "AlldebridCom" + __type__ = "account" + __version__ = "0.22" + + __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.logDebug("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.logDebug(page) + xml = dom.parseString(page) + exp_time = time() + int(xml.getElementsByTagName("date")[0].childNodes[0].nodeValue) * 24 * 60 * 60 + account_info = {"validuntil": exp_time, "trafficleft": -1} + return account_info + + def login(self, user, data, req): + urlparams = 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/account/BayfilesCom.py b/pyload/plugins/account/BayfilesCom.py new file mode 100644 index 000000000..221d1615d --- /dev/null +++ b/pyload/plugins/account/BayfilesCom.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- + +from time import time + +from pyload.plugins.base.Account import Account +from pyload.utils import json_loads + + +class BayfilesCom(Account): + __name__ = "BayfilesCom" + __type__ = "account" + __version__ = "0.03" + + __description__ = """Bayfiles.com account plugin""" + __author_name__ = "zoidberg" + __author_mail__ = "zoidberg@mujmail.cz" + + + def loadAccountInfo(self, user, req): + for _ in xrange(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(user) + + 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() diff --git a/pyload/plugins/account/BitshareCom.py b/pyload/plugins/account/BitshareCom.py new file mode 100644 index 000000000..ad44424b3 --- /dev/null +++ b/pyload/plugins/account/BitshareCom.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- + +from pyload.plugins.base.Account import Account + + +class BitshareCom(Account): + __name__ = "BitshareCom" + __type__ = "account" + __version__ = "0.12" + + __description__ = """Bitshare account plugin""" + __author_name__ = "Paul King" + __author_mail__ = None + + + 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.logWarning(_("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/account/CramitIn.py b/pyload/plugins/account/CramitIn.py new file mode 100644 index 000000000..5bf7a3141 --- /dev/null +++ b/pyload/plugins/account/CramitIn.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- + +from pyload.plugins.internal.XFSPAccount import XFSPAccount + + +class CramitIn(XFSPAccount): + __name__ = "CramitIn" + __type__ = "account" + __version__ = "0.01" + + __description__ = """Cramit.in account plugin""" + __author_name__ = "zoidberg" + __author_mail__ = "zoidberg@mujmail.cz" + + MAIN_PAGE = "http://cramit.in/" diff --git a/pyload/plugins/account/CyberlockerCh.py b/pyload/plugins/account/CyberlockerCh.py new file mode 100644 index 000000000..94cc0d8c4 --- /dev/null +++ b/pyload/plugins/account/CyberlockerCh.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- + +from pyload.plugins.internal.XFSPAccount import XFSPAccount +from pyload.plugins.internal.SimpleHoster import parseHtmlForm + + +class CyberlockerCh(XFSPAccount): + __name__ = "CyberlockerCh" + __type__ = "account" + __version__ = "0.01" + + __description__ = """Cyberlocker.ch 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/account/CzshareCom.py b/pyload/plugins/account/CzshareCom.py new file mode 100644 index 000000000..d22def156 --- /dev/null +++ b/pyload/plugins/account/CzshareCom.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- + +from time import mktime, strptime +import re + +from pyload.plugins.base.Account import Account + + +class CzshareCom(Account): + __name__ = "CzshareCom" + __type__ = "account" + __version__ = "0.14" + + __description__ = """Czshare.com account plugin, now Sdilej.cz""" + __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://sdilej.cz/prehled_kreditu/") + + m = re.search(self.CREDIT_LEFT_PATTERN, html) + if m is None: + return {"validuntil": 0, "trafficleft": 0} + else: + credits = float(m.group(1).replace(' ', '').replace(',', '.')) + credits = credits * 1024 ** {'KiB': 0, 'MiB': 1, 'GiB': 2}[m.group(2)] + validuntil = mktime(strptime(m.group(3), '%d.%m.%y %H:%M')) + return {"validuntil": validuntil, "trafficleft": credits} + + def login(self, user, data, req): + html = req.load('https://sdilej.cz/index.php', post={ + "Prihlasit": "Prihlasit", + "login-password": data['password'], + "login-name": user + }) + + if '
[^|]+) \|" + + + 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/account/DepositfilesCom.py b/pyload/plugins/account/DepositfilesCom.py new file mode 100644 index 000000000..9fc0772c4 --- /dev/null +++ b/pyload/plugins/account/DepositfilesCom.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- + +import re + +from time import strptime, mktime + +from pyload.plugins.base.Account import Account + + +class DepositfilesCom(Account): + __name__ = "DepositfilesCom" + __type__ = "account" + __version__ = "0.3" + + __description__ = """Depositfiles.com account plugin""" + __author_name__ = ("mkaay", "stickell", "Walter Purcaro") + __author_mail__ = ("mkaay@mkaay.de", "l.stickell@yahoo.it", "vuolter@gmail.com") + + + def loadAccountInfo(self, user, req): + src = req.load("https://dfiles.eu/de/gold/") + validuntil = re.search(r"Sie haben Gold Zugang bis: (.*?)
", src).group(1) + + validuntil = int(mktime(strptime(validuntil, "%Y-%m-%d %H:%M:%S"))) + + return {"validuntil": validuntil, "trafficleft": -1} + + def login(self, user, data, req): + src = req.load("https://dfiles.eu/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/account/DevhostSt.py b/pyload/plugins/account/DevhostSt.py new file mode 100644 index 000000000..03d7d9964 --- /dev/null +++ b/pyload/plugins/account/DevhostSt.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# +# Test links: +# http://d-h.st/mM8 + +import re + +from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo + + +class DevhostSt(SimpleHoster): + __name__ = "Devhost" + __type__ = "hoster" + __version__ = "0.01" + + __pattern__ = r'http://(?:www\.)?d-h\.st/\w+' + + __description__ = """d-h.st hoster plugin""" + __author_name__ = "zapp-brannigan" + __author_mail__ = "fuerst.reinje@web.de" + + + FILE_NAME_PATTERN = r'>Filename:
Size: (?P[\d.]+) (?P\w+)' + + OFFLINE_PATTERN = r'>File Not Found<' + LINK_PATTERN = r'id="downloadfile" href="(.+?)"' + + + def setup(self): + self.multiDL = True + self.chunkLimit = 1 + + + def handleFree(self): + m = re.search(self.LINK_PATTERN, self.html) + if m is None: + self.parseError("Download link not found") + + dl_url = m.group(1) + self.logDebug("Download URL = " + dl_url) + self.download(dl_url, disposition=True) + + check = self.checkDownload({'is_html': re.compile("html")}) + if check == "is_html": + self.parseError("Downloaded file is an html file") + + +getInfo = create_getInfo(DevhostSt) diff --git a/pyload/plugins/account/DevhostStFolder.py b/pyload/plugins/account/DevhostStFolder.py new file mode 100644 index 000000000..1c9bd3889 --- /dev/null +++ b/pyload/plugins/account/DevhostStFolder.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +# +# Test links: +# http://d-h.st/users/shine/?fld_id=37263#files + +import re + +from urlparse import urljoin + +from pyload.plugins.internal.SimpleCrypter import SimpleCrypter + + +class DevhostStFolder(SimpleCrypter): + __name__ = "DevhostStFolder" + __type__ = "crypter" + __version__ = "0.01" + + __pattern__ = r'http://(?:www\.)?d-h\.st/users/\w+/\?fld_id=\d+' + + __description__ = """d-h.st decrypter plugin""" + __author_name_ = "zapp-brannigan" + __author_mail_ = "fuerst.reinje@web.de" + + + LINK_PATTERN = r';">Dropbox - (?P.+?)<' + FILE_SIZE_PATTERN = r' ·  (?P[\d,]+) (?P\w+)' + + OFFLINE_PATTERN = r'Dropbox - (404|Shared link error)<' + + SH_COOKIES = [(".dropbox.com", "lang", "en")] + + + def setup(self): + self.multiDL = True + self.chunkLimit = 1 + self.resumeDownload = True + + + def handleFree(self): + self.download(self.pyfile.url, get={'dl': "1"}) + + check = self.checkDownload({'is_html': re.compile("html")}) + if check == "is_html": + self.parseError("Downloaded file is an html file") + + +getInfo = create_getInfo(DropboxCom) diff --git a/pyload/plugins/account/EasybytezCom.py b/pyload/plugins/account/EasybytezCom.py new file mode 100644 index 000000000..7634594e4 --- /dev/null +++ b/pyload/plugins/account/EasybytezCom.py @@ -0,0 +1,69 @@ +# -*- coding: utf-8 -*- + +import re +from time import mktime, strptime, gmtime + +from pyload.plugins.base.Account import Account +from pyload.plugins.internal.SimpleHoster import parseHtmlForm +from pyload.utils import parseFileSize + + +class EasybytezCom(Account): + __name__ = "EasybytezCom" + __type__ = "account" + __version__ = "0.06" + + __description__ = """EasyBytez.com account plugin""" + __author_name__ = ("zoidberg", "guidobelix") + __author_mail__ = ("zoidberg@mujmail.cz", "guidobelix@hotmail.it") + + VALID_UNTIL_PATTERN = r'Premium account expire:</TD><TD><b>([^<]+)</b>' + TRAFFIC_LEFT_PATTERN = r'<TR><TD>Traffic available today:</TD><TD><b>(?P<S>[^<]+)</b>' + + + def loadAccountInfo(self, user, req): + html = req.load("http://www.easybytez.com/?op=my_account", decode=True) + + validuntil = None + trafficleft = None + premium = False + + m = re.search(self.VALID_UNTIL_PATTERN, html) + if m: + expiredate = m.group(1) + self.logDebug("Expire date: " + expiredate) + + try: + validuntil = mktime(strptime(expiredate, "%d %B %Y")) + except Exception, e: + self.logError(e) + + if validuntil > mktime(gmtime()): + premium = True + trafficleft = -1 + else: + premium = False + validuntil = -1 + + m = re.search(self.TRAFFIC_LEFT_PATTERN, html) + if m: + trafficleft = m.group(1) + if "Unlimited" in trafficleft: + trafficleft = -1 + 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() diff --git a/pyload/plugins/account/EgoFilesCom.py b/pyload/plugins/account/EgoFilesCom.py new file mode 100644 index 000000000..8947d24c7 --- /dev/null +++ b/pyload/plugins/account/EgoFilesCom.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- + +import re +import time + +from pyload.plugins.base.Account import Account +from pyload.utils import parseFileSize + + +class EgoFilesCom(Account): + __name__ = "EgoFilesCom" + __type__ = "account" + __version__ = "0.2" + + __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/pyload/plugins/account/EuroshareEu.py b/pyload/plugins/account/EuroshareEu.py new file mode 100644 index 000000000..7481bceac --- /dev/null +++ b/pyload/plugins/account/EuroshareEu.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- + +from time import mktime, strptime +import re + +from pyload.plugins.base.Account import Account + + +class EuroshareEu(Account): + __name__ = "EuroshareEu" + __type__ = "account" + __version__ = "0.01" + + __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/") + + m = re.search('id="input_expire_date" value="(\d+\.\d+\.\d+ \d+:\d+)"', html) + if m is None: + premium, validuntil = False, -1 + else: + premium = True + validuntil = mktime(strptime(m.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() diff --git a/pyload/plugins/account/FastixRu.py b/pyload/plugins/account/FastixRu.py new file mode 100644 index 000000000..953ba0c1e --- /dev/null +++ b/pyload/plugins/account/FastixRu.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- + +from pyload.plugins.base.Account import Account +from pyload.utils import json_loads + + +class FastixRu(Account): + __name__ = "FastixRu" + __type__ = "account" + __version__ = "0.02" + + __description__ = """Fastix account plugin""" + __author_name__ = "Massimo Rosamilia" + __author_mail__ = "max@spiritix.eu" + + + def loadAccountInfo(self, user, req): + data = self.getAccountData(user) + page = req.load("http://fastix.ru/api_v2/?apikey=%s&sub=getaccountdetails" % (data['api'])) + page = json_loads(page) + points = page['points'] + kb = float(points) + kb = kb * 1024 ** 2 / 1000 + if points > 0: + account_info = {"validuntil": -1, "trafficleft": kb} + else: + account_info = {"validuntil": None, "trafficleft": None, "premium": False} + return account_info + + def login(self, user, data, req): + page = req.load("http://fastix.ru/api_v2/?sub=get_apikey&email=%s&password=%s" % (user, data['password'])) + api = json_loads(page) + api = api['apikey'] + data['api'] = api + if "error_code" in page: + self.wrongPassword() diff --git a/pyload/plugins/account/FastshareCz.py b/pyload/plugins/account/FastshareCz.py new file mode 100644 index 000000000..0feca4198 --- /dev/null +++ b/pyload/plugins/account/FastshareCz.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- + +import re +from pyload.plugins.base.Account import Account +from pyload.utils import parseFileSize + + +class FastshareCz(Account): + __name__ = "FastshareCz" + __type__ = "account" + __version__ = "0.03" + + __description__ = """Fastshare.cz account plugin""" + __author_name__ = ("zoidberg", "stickell") + __author_mail__ = ("zoidberg@mujmail.cz", "l.stickell@yahoo.it") + + CREDIT_PATTERN = r'(?:Kredit|Credit)\s*</td>\s*<td[^>]*>([\d. \w]+) ' + + + def loadAccountInfo(self, user, req): + html = req.load("http://www.fastshare.cz/user", decode=True) + + m = re.search(self.CREDIT_PATTERN, html) + if m: + trafficleft = parseFileSize(m.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() diff --git a/pyload/plugins/account/File4safeCom.py b/pyload/plugins/account/File4safeCom.py new file mode 100644 index 000000000..4da721193 --- /dev/null +++ b/pyload/plugins/account/File4safeCom.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- + +from pyload.plugins.internal.XFSPAccount import XFSPAccount + + +class File4safeCom(XFSPAccount): + __name__ = "File4safeCom" + __type__ = "account" + __version__ = "0.01" + + __description__ = """File4safe.com account plugin""" + __author_name__ = "stickell" + __author_mail__ = "l.stickell@yahoo.it" + + MAIN_PAGE = "http://file4safe.com/" + + LOGIN_FAIL_PATTERN = r'input_login' + PREMIUM_PATTERN = r'Extend Premium' diff --git a/pyload/plugins/account/FilecloudIo.py b/pyload/plugins/account/FilecloudIo.py new file mode 100644 index 000000000..504c10be2 --- /dev/null +++ b/pyload/plugins/account/FilecloudIo.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- + +from pyload.plugins.base.Account import Account +from pyload.utils import json_loads + + +class FilecloudIo(Account): + __name__ = "FilecloudIo" + __type__ = "account" + __version__ = "0.02" + + __description__ = """FilecloudIo account plugin""" + __author_name__ = ("zoidberg", "stickell") + __author_mail__ = ("zoidberg@mujmail.cz", "l.stickell@yahoo.it") + + + def loadAccountInfo(self, user, req): + # It looks like the first API request always fails, so we retry 5 times, it should work on the second try + for _ in xrange(5): + rep = req.load("https://secure.filecloud.io/api-fetch_apikey.api", + post={"username": user, "password": self.accounts[user]['password']}) + rep = json_loads(rep) + if rep['status'] == 'ok': + break + elif rep['status'] == 'error' and rep['message'] == 'no such user or wrong password': + self.logError("Wrong username or password") + return {"valid": False, "premium": False} + else: + return {"premium": False} + + akey = rep['akey'] + self.accounts[user]['akey'] = akey # Saved for hoster plugin + rep = req.load("http://api.filecloud.io/api-fetch_account_details.api", + post={"akey": akey}) + rep = json_loads(rep) + + if rep['is_premium'] == 1: + return {"validuntil": int(rep['premium_until']), "trafficleft": -1} + else: + return {"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 = {} diff --git a/pyload/plugins/account/FilefactoryCom.py b/pyload/plugins/account/FilefactoryCom.py new file mode 100644 index 000000000..047e7bb36 --- /dev/null +++ b/pyload/plugins/account/FilefactoryCom.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- + +import re +from time import mktime, strptime + +from pycurl import REFERER + +from pyload.plugins.base.Account import Account + + +class FilefactoryCom(Account): + __name__ = "FilefactoryCom" + __type__ = "account" + __version__ = "0.14" + + __description__ = """Filefactory.com account plugin""" + __author_name__ = ("zoidberg", "stickell") + __author_mail__ = ("zoidberg@mujmail.cz", "l.stickell@yahoo.it") + + VALID_UNTIL_PATTERN = r'Premium valid until: <strong>(?P<d>\d{1,2})\w{1,2} (?P<m>\w{3}), (?P<y>\d{4})</strong>' + + + def loadAccountInfo(self, user, req): + html = req.load("http://www.filefactory.com/account/") + + m = re.search(self.VALID_UNTIL_PATTERN, html) + if m: + premium = True + validuntil = re.sub(self.VALID_UNTIL_PATTERN, '\g<d> \g<m> \g<y>', m.group(0)) + validuntil = mktime(strptime(validuntil, "%d %b %Y")) + else: + premium = False + validuntil = -1 + + return {"premium": premium, "trafficleft": -1, "validuntil": validuntil} + + def login(self, user, data, req): + req.http.c.setopt(REFERER, "http://www.filefactory.com/member/login.php") + + html = req.load("http://www.filefactory.com/member/signin.php", post={ + "loginEmail": user, + "loginPassword": data['password'], + "Submit": "Sign In"}) + + if req.lastEffectiveURL != "http://www.filefactory.com/account/": + self.wrongPassword() diff --git a/pyload/plugins/account/FilejungleCom.py b/pyload/plugins/account/FilejungleCom.py new file mode 100644 index 000000000..596e928ed --- /dev/null +++ b/pyload/plugins/account/FilejungleCom.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- + +import re +from time import mktime, strptime + +from pyload.plugins.base.Account import Account + + +class FilejungleCom(Account): + __name__ = "FilejungleCom" + __type__ = "account" + __version__ = "0.11" + + __description__ = """Filejungle.com account plugin""" + __author_name__ = "zoidberg" + __author_mail__ = "zoidberg@mujmail.cz" + + login_timeout = 60 + + URL = "http://filejungle.com/" + TRAFFIC_LEFT_PATTERN = r'"/extend_premium\.php">Until (\d+ [A-Za-z]+ \d+)<br' + LOGIN_FAILED_PATTERN = r'<span htmlfor="loginUser(Name|Password)" generated="true" class="fail_info">' + + + def loadAccountInfo(self, user, req): + html = req.load(self.URL + "dashboard.php") + m = re.search(self.TRAFFIC_LEFT_PATTERN, html) + if m: + premium = True + validuntil = mktime(strptime(m.group(1), "%d %b %Y")) + else: + premium = False + validuntil = -1 + + return {"premium": premium, "trafficleft": -1, "validuntil": validuntil} + + def login(self, user, data, req): + html = req.load(self.URL + "login.php", post={ + "loginUserName": user, + "loginUserPassword": data['password'], + "loginFormSubmit": "Login", + "recaptcha_challenge_field": "", + "recaptcha_response_field": "", + "recaptcha_shortencode_field": ""}) + + if re.search(self.LOGIN_FAILED_PATTERN, html): + self.wrongPassword() diff --git a/pyload/plugins/account/FilerNet.py b/pyload/plugins/account/FilerNet.py new file mode 100644 index 000000000..67bab6ba8 --- /dev/null +++ b/pyload/plugins/account/FilerNet.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- + +import re +import time + +from pyload.plugins.base.Account import Account +from pyload.utils import parseFileSize + + +class FilerNet(Account): + __name__ = "FilerNet" + __type__ = "account" + __version__ = "0.01" + + __description__ = """Filer.net account plugin""" + __author_name__ = "stickell" + __author_mail__ = "l.stickell@yahoo.it" + + TOKEN_PATTERN = r'_csrf_token" value="([^"]+)" />' + WALID_UNTIL_PATTERN = r"Der Premium-Zugang ist gültig bis (.+)\.\s*</td>" + TRAFFIC_PATTERN = r'Traffic</th>\s*<td>([^<]+)</td>' + FREE_PATTERN = r'Account Status</th>\s*<td>\s*Free' + + + def loadAccountInfo(self, user, req): + html = req.load("https://filer.net/profile") + + # Free user + if re.search(self.FREE_PATTERN, html): + return {"premium": False, "validuntil": None, "trafficleft": None} + + until = re.search(self.WALID_UNTIL_PATTERN, html) + traffic = re.search(self.TRAFFIC_PATTERN, html) + if until and traffic: + validuntil = int(time.mktime(time.strptime(until.group(1), "%d.%m.%Y %H:%M:%S"))) + trafficleft = parseFileSize(traffic.group(1)) / 1024 + return {"premium": True, "validuntil": validuntil, "trafficleft": trafficleft} + else: + self.logError("Unable to retrieve account information - Plugin may be out of date") + return {"premium": False, "validuntil": None, "trafficleft": None} + + def login(self, user, data, req): + html = req.load("https://filer.net/login") + token = re.search(self.TOKEN_PATTERN, html).group(1) + html = req.load("https://filer.net/login_check", + post={"_username": user, "_password": data['password'], + "_remember_me": "on", "_csrf_token": token, "_target_path": "https://filer.net/"}) + if 'Logout' not in html: + self.wrongPassword() diff --git a/pyload/plugins/account/FilerioCom.py b/pyload/plugins/account/FilerioCom.py new file mode 100644 index 000000000..0a8bc10cd --- /dev/null +++ b/pyload/plugins/account/FilerioCom.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- + +from pyload.plugins.internal.XFSPAccount import XFSPAccount + + +class FilerioCom(XFSPAccount): + __name__ = "FilerioCom" + __type__ = "account" + __version__ = "0.01" + + __description__ = """FileRio.in account plugin""" + __author_name__ = "zoidberg" + __author_mail__ = "zoidberg@mujmail.cz" + + MAIN_PAGE = "http://filerio.in/" diff --git a/pyload/plugins/account/FilesMailRu.py b/pyload/plugins/account/FilesMailRu.py new file mode 100644 index 000000000..b0375f6d2 --- /dev/null +++ b/pyload/plugins/account/FilesMailRu.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- + +from pyload.plugins.base.Account import Account + + +class FilesMailRu(Account): + __name__ = "FilesMailRu" + __type__ = "account" + __version__ = "0.1" + + __description__ = """Filesmail.ru account plugin""" + __author_name__ = "RaNaN" + __author_mail__ = "RaNaN@pyload.org" + + + def loadAccountInfo(self, user, req): + return {"validuntil": None, "trafficleft": None} + + def login(self, user, data, req): + user, domain = user.split("@") + + page = req.load("http://swa.mail.ru/cgi-bin/auth", None, + {"Domain": domain, "Login": user, "Password": data['password'], + "Page": "http://files.mail.ru/"}, cookies=True) + + if "Неверное имя пользователя или пароль" in page: # @TODO seems not to work + self.wrongPassword() diff --git a/pyload/plugins/account/FileserveCom.py b/pyload/plugins/account/FileserveCom.py new file mode 100644 index 000000000..ea678f87b --- /dev/null +++ b/pyload/plugins/account/FileserveCom.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- + +from time import mktime, strptime + +from pyload.plugins.base.Account import Account +from pyload.utils import json_loads + + +class FileserveCom(Account): + __name__ = "FileserveCom" + __type__ = "account" + __version__ = "0.2" + + __description__ = """Fileserve.com account plugin""" + __author_name__ = "mkaay" + __author_mail__ = "mkaay@mkaay.de" + + + def loadAccountInfo(self, user, req): + data = self.getAccountData(user) + + page = req.load("http://app.fileserve.com/api/login/", post={"username": user, "password": data['password'], + "submit": "Submit+Query"}) + res = json_loads(page) + + if res['type'] == "premium": + validuntil = mktime(strptime(res['expireTime'], "%Y-%m-%d %H:%M:%S")) + return {"trafficleft": res['traffic'], "validuntil": validuntil} + else: + return {"premium": False, "trafficleft": None, "validuntil": None} + + def login(self, user, data, req): + page = req.load("http://app.fileserve.com/api/login/", post={"username": user, "password": data['password'], + "submit": "Submit+Query"}) + res = json_loads(page) + + if not res['type']: + self.wrongPassword() + + #login at fileserv page + req.load("http://www.fileserve.com/login.php", + post={"loginUserName": user, "loginUserPassword": data['password'], "autoLogin": "checked", + "loginFormSubmit": "Login"}) diff --git a/pyload/plugins/account/FourSharedCom.py b/pyload/plugins/account/FourSharedCom.py new file mode 100644 index 000000000..c973f4d65 --- /dev/null +++ b/pyload/plugins/account/FourSharedCom.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- + +from pyload.plugins.base.Account import Account +from pyload.utils import json_loads + + +class FourSharedCom(Account): + __name__ = "FourSharedCom" + __type__ = "account" + __version__ = "0.03" + + __description__ = """FourShared.com account plugin""" + __author_name__ = ("zoidberg", "stickell") + __author_mail__ = ("zoidberg@mujmail.cz", "l.stickell@yahoo.it") + + + def loadAccountInfo(self, user, req): + # Free mode only for now + return {"premium": False} + + def login(self, user, data, req): + req.cj.setCookie("4shared.com", "4langcookie", "en") + response = req.load('http://www.4shared.com/web/login', + post={"login": user, + "password": data['password'], + "remember": "on", + "_remember": "on", + "returnTo": "http://www.4shared.com/account/home.jsp"}) + + if 'Please log in to access your 4shared account' in response: + self.wrongPassword() diff --git a/pyload/plugins/account/FreakshareCom.py b/pyload/plugins/account/FreakshareCom.py new file mode 100644 index 000000000..9bc68e6b4 --- /dev/null +++ b/pyload/plugins/account/FreakshareCom.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- + +import re +from time import strptime, mktime + +from pyload.plugins.base.Account import Account + + +class FreakshareCom(Account): + __name__ = "FreakshareCom" + __type__ = "account" + __version__ = "0.1" + + __description__ = """Freakshare.com account plugin""" + __author_name__ = "RaNaN" + __author_mail__ = "RaNaN@pyload.org" + + + def loadAccountInfo(self, user, req): + page = req.load("http://freakshare.com/") + + validuntil = r"ltig bis:</td>\s*<td><b>([0-9 \-:.]+)</b></td>" + validuntil = re.search(validuntil, page, re.MULTILINE) + validuntil = validuntil.group(1).strip() + validuntil = mktime(strptime(validuntil, "%d.%m.%Y - %H:%M")) + + traffic = r"Traffic verbleibend:</td>\s*<td>([^<]+)" + traffic = re.search(traffic, page, re.MULTILINE) + traffic = traffic.group(1).strip() + traffic = self.parseTraffic(traffic) + + return {"validuntil": validuntil, "trafficleft": traffic} + + def login(self, user, data, req): + page = req.load("http://freakshare.com/login.html", None, + {"submit": "Login", "user": user, "pass": data['password']}, cookies=True) + + if "Falsche Logindaten!" in page or "Wrong Username or Password!" in page: + self.wrongPassword() diff --git a/pyload/plugins/account/FreeWayMe.py b/pyload/plugins/account/FreeWayMe.py new file mode 100644 index 000000000..c40d4486d --- /dev/null +++ b/pyload/plugins/account/FreeWayMe.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- + +from pyload.plugins.base.Account import Account +from pyload.utils import json_loads + + +class FreeWayMe(Account): + __name__ = "FreeWayMe" + __type__ = "account" + __version__ = "0.11" + + __description__ = """FreeWayMe account plugin""" + __author_name__ = "Nicolas Giese" + __author_mail__ = "james@free-way.me" + + + def loadAccountInfo(self, user, req): + status = self.getAccountStatus(user, req) + if not status: + return False + self.logDebug(status) + + account_info = {"validuntil": -1, "premium": False} + if status['premium'] == "Free": + account_info['trafficleft'] = int(status['guthaben']) * 1024 + elif status['premium'] == "Spender": + account_info['trafficleft'] = -1 + elif status['premium'] == "Flatrate": + account_info = {"validuntil": int(status['Flatrate']), + "trafficleft": -1, + "premium": True} + + return account_info + + def getpw(self, user): + return self.accounts[user]['password'] + + def login(self, user, data, req): + status = self.getAccountStatus(user, req) + + # Check if user and password are valid + if not status: + self.wrongPassword() + + def getAccountStatus(self, user, req): + answer = req.load("https://www.free-way.me/ajax/jd.php", + get={"id": 4, "user": user, "pass": self.accounts[user]['password']}) + self.logDebug("Login: %s" % answer) + if answer == "Invalid login": + self.wrongPassword() + return False + return json_loads(answer) diff --git a/pyload/plugins/account/FshareVn.py b/pyload/plugins/account/FshareVn.py new file mode 100644 index 000000000..6a357f4bc --- /dev/null +++ b/pyload/plugins/account/FshareVn.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- + +from time import mktime, strptime +from pycurl import REFERER +import re + +from pyload.plugins.base.Account import Account + + +class FshareVn(Account): + __name__ = "FshareVn" + __type__ = "account" + __version__ = "0.07" + + __description__ = """Fshare.vn account plugin""" + __author_name__ = ("zoidberg", "stickell") + __author_mail__ = ("zoidberg@mujmail.cz", "l.stickell@yahoo.it") + + VALID_UNTIL_PATTERN = ur'<dt>Thời hạn dùng:</dt>\s*<dd>([^<]+)</dd>' + LIFETIME_PATTERN = ur'<dt>Lần đăng nhập trước:</dt>\s*<dd>[^<]+</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): + html = req.load("http://www.fshare.vn/account_info.php", decode=True) + + if re.search(self.LIFETIME_PATTERN, html): + self.logDebug("Lifetime membership detected") + trafficleft = self.getTrafficLeft() + return {"validuntil": -1, "trafficleft": trafficleft, "premium": True} + + m = re.search(self.VALID_UNTIL_PATTERN, html) + if m: + premium = True + validuntil = mktime(strptime(m.group(1), '%I:%M:%S %p %d-%m-%Y')) + trafficleft = self.getTrafficLeft() + 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") + + html = req.load('https://www.fshare.vn/login.php', post={ + "login_password": data['password'], + "login_useremail": user, + "url_refe": "http://www.fshare.vn/index.php" + }, referer=True, decode=True) + + if not re.search(r'<img\s+alt="VIP"', html): + self.wrongPassword() + + def getTrafficLeft(self): + m = re.search(self.TRAFFIC_LEFT_PATTERN, html) + return float(m.group(1)) * 1024 ** {'k': 0, 'K': 0, 'M': 1, 'G': 2}[m.group(2)] if m else 0 diff --git a/pyload/plugins/account/Ftp.py b/pyload/plugins/account/Ftp.py new file mode 100644 index 000000000..e331e4389 --- /dev/null +++ b/pyload/plugins/account/Ftp.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- + +from pyload.plugins.base.Account import Account + + +class Ftp(Account): + __name__ = "Ftp" + __type__ = "account" + __version__ = "0.01" + + __description__ = """Ftp dummy account plugin""" + __author_name__ = "zoidberg" + __author_mail__ = "zoidberg@mujmail.cz" + + + login_timeout = info_threshold = -1 #: Unlimited diff --git a/pyload/plugins/account/HellshareCz.py b/pyload/plugins/account/HellshareCz.py new file mode 100644 index 000000000..6b5d0a87b --- /dev/null +++ b/pyload/plugins/account/HellshareCz.py @@ -0,0 +1,74 @@ +# -*- coding: utf-8 -*- + +import re +import time + +from pyload.plugins.base.Account import Account + + +class HellshareCz(Account): + __name__ = "HellshareCz" + __type__ = "account" + __version__ = "0.14" + + __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+|\d\d\.\d\d\.)</th>' + + + def loadAccountInfo(self, user, req): + self.relogin(user) + html = req.load("http://www.hellshare.com/") + + m = re.search(self.CREDIT_LEFT_PATTERN, html) + if m is None: + trafficleft = None + validuntil = None + premium = False + else: + credit = m.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": 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'], + "username": user, + "perm_login": "on" + }) + + if "<p>You input a wrong user name or wrong password</p>" in html: + self.wrongPassword() diff --git a/pyload/plugins/account/HotfileCom.py b/pyload/plugins/account/HotfileCom.py new file mode 100644 index 000000000..3dde85b49 --- /dev/null +++ b/pyload/plugins/account/HotfileCom.py @@ -0,0 +1,74 @@ +# -*- coding: utf-8 -*- + +from time import strptime, mktime +import hashlib + +from pyload.plugins.base.Account import Account + + +class HotfileCom(Account): + __name__ = "HotfileCom" + __type__ = "account" + __version__ = "0.2" + + __description__ = """Hotfile.com account plugin""" + __author_name__ = ("mkaay", "JoKoT3") + __author_mail__ = ("mkaay@mkaay.de", "jokot3@gmail.com") + + + def loadAccountInfo(self, user, req): + resp = self.apiCall("getuserinfo", user=user) + if resp.startswith("."): + self.core.debug("HotfileCom API Error: %s" % resp) + raise Exception + info = {} + for p in resp.split("&"): + key, value = p.split("=") + info[key] = value + + if info['is_premium'] == '1': + info['premium_until'] = info['premium_until'].replace("T", " ") + zone = info['premium_until'][19:] + info['premium_until'] = info['premium_until'][:19] + zone = int(zone[:3]) + + validuntil = int(mktime(strptime(info['premium_until'], "%Y-%m-%d %H:%M:%S"))) + (zone * 60 * 60) + tmp = {"validuntil": validuntil, "trafficleft": -1, "premium": True} + + elif info['is_premium'] == '0': + tmp = {"premium": False} + + return tmp + + def apiCall(self, method, post={}, user=None): + if user: + data = self.getAccountData(user) + else: + user, data = self.selectAccount() + + req = self.getAccountRequest(user) + + digest = req.load("http://api.hotfile.com/", post={"action": "getdigest"}) + h = hashlib.md5() + h.update(data['password']) + hp = h.hexdigest() + h = hashlib.md5() + h.update(hp) + h.update(digest) + pwhash = h.hexdigest() + + post.update({"action": method}) + post.update({"username": user, "passwordmd5dig": pwhash, "digest": digest}) + resp = req.load("http://api.hotfile.com/", post=post) + req.close() + return resp + + def login(self, user, data, req): + cj = self.getAccountCookies(user) + cj.setCookie("hotfile.com", "lang", "en") + req.load("http://hotfile.com/", cookies=True) + page = req.load("http://hotfile.com/login.php", post={"returnto": "/", "user": user, "pass": data['password']}, + cookies=True) + + if "Bad username/password" in page: + self.wrongPassword() diff --git a/pyload/plugins/account/Http.py b/pyload/plugins/account/Http.py new file mode 100644 index 000000000..647af44fe --- /dev/null +++ b/pyload/plugins/account/Http.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- + +from pyload.plugins.base.Account import Account + + +class Http(Account): + __name__ = "Http" + __type__ = "account" + __version__ = "0.01" + + __description__ = """Http dummy account plugin""" + __author_name__ = "zoidberg" + __author_mail__ = "zoidberg@mujmail.cz" + + + login_timeout = info_threshold = -1 #: Unlimited diff --git a/pyload/plugins/account/KingfilesNet.py b/pyload/plugins/account/KingfilesNet.py new file mode 100644 index 000000000..44c01f770 --- /dev/null +++ b/pyload/plugins/account/KingfilesNet.py @@ -0,0 +1,86 @@ +# -*- coding: utf-8 -*- + +import re + +from pyload.plugins.internal.CaptchaService import SolveMedia +from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo + + +class KingfilesNet(SimpleHoster): + __name__ = "KingfilesNet" + __type__ = "hoster" + __version__ = "0.01" + + __pattern__ = r'http://(?:www\.)?kingfiles\.net/(?P<ID>\w{12})' + + __description__ = """Kingfiles.net hoster plugin""" + __author_name__ = ("zapp-brannigan", "Walter Purcaro") + __author_mail__ = ("fuerst.reinje@web.de", "vuolter@gmail.com") + + + FILE_NAME_PATTERN = r'name="fname" value="(?P<N>.+?)">' + FILE_SIZE_PATTERN = r'>Size: .+?">(?P<S>[\d.]+) (?P<U>\w+)' + + OFFLINE_PATTERN = r'>(File Not Found</b><br><br>|File Not Found</h2>)' + + RAND_ID_PATTERN = r'type=\"hidden\" name=\"rand\" value=\"(.+)\">' + + LINK_PATTERN = r'var download_url = \'(.+)\';' + + + def setup(self): + self.multiDL = True + self.resumeDownload = True + + + def handleFree(self): + # Click the free user button + post_data = {'op': "download1", + 'usr_login': "", + 'id': file_info['ID'], + 'fname': self.pyfile.name, + 'referer': "", + 'method_free': "+"} + b = self.load(self.pyfile.url, post=post_data, cookies=True, decode=True) + + solvemedia = SolveMedia(self) + + captcha_key = solvemedia.detect_key() + if captcha_key is None: + self.parseError("SolveMedia key not found") + + self.logDebug("captcha_key", captcha_key) + captcha_challenge, captcha_response = solvemedia.challenge(captcha_key) + + # Make the downloadlink appear and load the file + m = re.search(self.RAND_ID_PATTERN, b) + if m is None: + self.parseError("Random key not found") + + rand = m.group(1) + self.logDebug("rand", rand) + + post_data = {'op': "download2", + 'id': file_id, + 'rand': rand, + 'referer': self.pyfile.url, + 'method_free': "+", + 'method_premium': "", + 'adcopy_response': captcha_response, + 'adcopy_challenge': captcha_challenge, + 'down_direct': "1"} + c = self.load(self.pyfile.url, post=post_data, cookies=True, decode=True) + + m = re.search(self.LINK_PATTERN, c) + if m is None: + self.parseError("Download url not found") + + dl_url = m.group(1) + self.download(dl_url, cookies=True, disposition=True) + + check = self.checkDownload({'is_html': re.compile("<html>")}) + if check == "is_html": + self.parseError("Downloaded file is an html file") + + +getInfo = create_getInfo(KingfilesNet) diff --git a/pyload/plugins/account/LetitbitNet.py b/pyload/plugins/account/LetitbitNet.py new file mode 100644 index 000000000..7c43fff94 --- /dev/null +++ b/pyload/plugins/account/LetitbitNet.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- + +from pyload.plugins.base.Account import Account +# from pyload.utils import json_loads, json_dumps + + +class LetitbitNet(Account): + __name__ = "LetitbitNet" + __type__ = "account" + __version__ = "0.01" + + __description__ = """Letitbit.net account plugin""" + __author_name__ = "stickell" + __author_mail__ = "l.stickell@yahoo.it" + + + def loadAccountInfo(self, user, req): + ## DISABLED BECAUSE IT GET 'key exausted' EVEN IF VALID ## + # api_key = self.accounts[user]['password'] + # json_data = [api_key, ['key/info']] + # api_rep = req.load('http://api.letitbit.net/json', post={'r': json_dumps(json_data)}) + # self.logDebug("API Key Info: " + api_rep) + # api_rep = json_loads(api_rep) + # + # if api_rep['status'] == 'FAIL': + # self.logWarning(api_rep['data']) + # return {'valid': False, 'premium': False} + + return {"premium": True} + + def login(self, user, data, req): + # API_KEY is the username and the PREMIUM_KEY is the password + self.logInfo("You must use your API KEY as username and the PREMIUM KEY as password.") diff --git a/pyload/plugins/account/LinksnappyCom.py b/pyload/plugins/account/LinksnappyCom.py new file mode 100644 index 000000000..9dc1a8b36 --- /dev/null +++ b/pyload/plugins/account/LinksnappyCom.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- + +from hashlib import md5 + +from pyload.plugins.base.Account import Account +from pyload.utils import json_loads + + +class LinksnappyCom(Account): + __name__ = "LinksnappyCom" + __type__ = "account" + __version__ = "0.02" + + __description__ = """Linksnappy.com account plugin""" + __author_name__ = "stickell" + __author_mail__ = "l.stickell@yahoo.it" + + + def loadAccountInfo(self, user, req): + data = self.getAccountData(user) + r = req.load('http://gen.linksnappy.com/lseAPI.php', + get={'act': 'USERDETAILS', 'username': user, 'password': md5(data['password']).hexdigest()}) + self.logDebug("JSON data: " + r) + j = json_loads(r) + + if j['error']: + return {"premium": False} + + validuntil = j['return']['expire'] + if validuntil == 'lifetime': + validuntil = -1 + elif validuntil == 'expired': + return {"premium": False} + else: + validuntil = float(validuntil) + + if 'trafficleft' not in j['return'] or isinstance(j['return']['trafficleft'], str): + trafficleft = -1 + else: + trafficleft = int(j['return']['trafficleft']) * 1024 + + return {"premium": True, "validuntil": validuntil, "trafficleft": trafficleft} + + def login(self, user, data, req): + r = req.load('http://gen.linksnappy.com/lseAPI.php', + get={'act': 'USERDETAILS', 'username': user, 'password': md5(data['password']).hexdigest()}) + + if 'Invalid Account Details' in r: + self.wrongPassword() diff --git a/pyload/plugins/account/MegaDebridEu.py b/pyload/plugins/account/MegaDebridEu.py new file mode 100644 index 000000000..5c58505f3 --- /dev/null +++ b/pyload/plugins/account/MegaDebridEu.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- + +from pyload.plugins.base.Account import Account +from pyload.utils import json_loads + + +class MegaDebridEu(Account): + __name__ = "MegaDebridEu" + __type__ = "account" + __version__ = "0.2" + + __description__ = """mega-debrid.eu account plugin""" + __author_name__ = "D.Ducatel" + __author_mail__ = "dducatel@je-geek.fr" + + # Define the base URL of MegaDebrid api + API_URL = "https://www.mega-debrid.eu/api.php" + + + def loadAccountInfo(self, user, req): + data = self.getAccountData(user) + jsonResponse = req.load(self.API_URL, + get={'action': 'connectUser', 'login': user, 'password': data['password']}) + response = json_loads(jsonResponse) + + if response['response_code'] == "ok": + return {"premium": True, "validuntil": float(response['vip_end']), "status": True} + else: + self.logError(response) + return {"status": False, "premium": False} + + def login(self, user, data, req): + jsonResponse = req.load(self.API_URL, + get={'action': 'connectUser', 'login': user, 'password': data['password']}) + response = json_loads(jsonResponse) + if response['response_code'] != "ok": + self.wrongPassword() diff --git a/pyload/plugins/account/MegasharesCom.py b/pyload/plugins/account/MegasharesCom.py new file mode 100644 index 000000000..da0dd7ae7 --- /dev/null +++ b/pyload/plugins/account/MegasharesCom.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- + +import re +from time import mktime, strptime + +from pyload.plugins.base.Account import Account + + +class MegasharesCom(Account): + __name__ = "MegasharesCom" + __type__ = "account" + __version__ = "0.02" + + __description__ = """Megashares.com account plugin""" + __author_name__ = "zoidberg" + __author_mail__ = "zoidberg@mujmail.cz" + + VALID_UNTIL_PATTERN = r'<p class="premium_info_box">Period Ends: (\w{3} \d{1,2}, \d{4})</p>' + + + def loadAccountInfo(self, user, req): + #self.relogin(user) + html = req.load("http://d01.megashares.com/myms.php", decode=True) + + premium = False if '>Premium Upgrade<' in html else True + + validuntil = trafficleft = -1 + try: + timestr = re.search(self.VALID_UNTIL_PATTERN, html).group(1) + self.logDebug(timestr) + validuntil = mktime(strptime(timestr, "%b %d, %Y")) + except Exception, e: + self.logError(e) + + return {"validuntil": validuntil, "trafficleft": -1, "premium": premium} + + def login(self, user, data, req): + html = req.load('http://d01.megashares.com/myms_login.php', post={ + "httpref": "", + "myms_login": "Login", + "mymslogin_name": user, + "mymspassword": data['password'] + }, decode=True) + + if not '<span class="b ml">%s</span>' % user in html: + self.wrongPassword() diff --git a/pyload/plugins/account/MovReelCom.py b/pyload/plugins/account/MovReelCom.py new file mode 100644 index 000000000..0f80b1aa8 --- /dev/null +++ b/pyload/plugins/account/MovReelCom.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- + +from pyload.plugins.internal.XFSPAccount import XFSPAccount + + +class MovReelCom(XFSPAccount): + __name__ = "MovReelCom" + __type__ = "account" + __version__ = "0.01" + + __description__ = """Movreel.com account plugin""" + __author_name__ = "t4skforce" + __author_mail__ = "t4skforce1337[AT]gmail[DOT]com" + + login_timeout = 60 + info_threshold = 30 + + MAIN_PAGE = "http://movreel.com/" + + TRAFFIC_LEFT_PATTERN = r'Traffic.*?<b>([^<]+)</b>' + LOGIN_FAIL_PATTERN = r'<b[^>]*>Incorrect Login or Password</b><br>' diff --git a/pyload/plugins/account/MultishareCz.py b/pyload/plugins/account/MultishareCz.py new file mode 100644 index 000000000..fb6677a51 --- /dev/null +++ b/pyload/plugins/account/MultishareCz.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- + +from pyload.plugins.base.Account import Account +#from time import mktime, strptime +#from pycurl import REFERER +import re +from pyload.utils import parseFileSize + + +class MultishareCz(Account): + __name__ = "MultishareCz" + __type__ = "account" + __version__ = "0.02" + + __description__ = """Multishare.cz account plugin""" + __author_name__ = "zoidberg" + __author_mail__ = "zoidberg@mujmail.cz" + + TRAFFIC_LEFT_PATTERN = r'<span class="profil-zvyrazneni">Kredit:</span>\s*<strong>(?P<S>[0-9,]+) (?P<U>\w+)</strong>' + ACCOUNT_INFO_PATTERN = r'<input type="hidden" id="(u_ID|u_hash)" name="[^"]*" value="([^"]+)">' + + + def loadAccountInfo(self, user, req): + #self.relogin(user) + html = req.load("http://www.multishare.cz/profil/", decode=True) + + m = re.search(self.TRAFFIC_LEFT_PATTERN, html) + trafficleft = parseFileSize(m.group('S'), m.group('U')) / 1024 if m else 0 + self.premium = True if trafficleft else False + + html = req.load("http://www.multishare.cz/", decode=True) + mms_info = dict(re.findall(self.ACCOUNT_INFO_PATTERN, html)) + + return dict(mms_info, **{"validuntil": -1, "trafficleft": trafficleft}) + + def login(self, user, data, req): + html = req.load('http://www.multishare.cz/html/prihlaseni_process.php', post={ + "akce": "Přihlásit", + "heslo": data['password'], + "jmeno": user + }, decode=True) + + if '<div class="akce-chyba akce">' in html: + self.wrongPassword() diff --git a/pyload/plugins/account/MyfastfileCom.py b/pyload/plugins/account/MyfastfileCom.py new file mode 100644 index 000000000..6c90793d0 --- /dev/null +++ b/pyload/plugins/account/MyfastfileCom.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- + +from time import time + +from pyload.plugins.base.Account import Account +from pyload.utils import json_loads + + +class MyfastfileCom(Account): + __name__ = "MyfastfileCom" + __type__ = "account" + __version__ = "0.02" + + __description__ = """Myfastfile.com account plugin""" + __author_name__ = "stickell" + __author_mail__ = "l.stickell@yahoo.it" + + + def loadAccountInfo(self, user, req): + if 'days_left' in self.json_data: + validuntil = int(time() + self.json_data['days_left'] * 24 * 60 * 60) + return {"premium": True, "validuntil": validuntil, "trafficleft": -1} + else: + self.logError("Unable to get account information") + + def login(self, user, data, req): + # Password to use is the API-Password written in http://myfastfile.com/myaccount + html = req.load("http://myfastfile.com/api.php", + get={"user": user, "pass": data['password']}) + self.logDebug("JSON data: " + html) + self.json_data = json_loads(html) + if self.json_data['status'] != 'ok': + self.logError('Invalid login. The password to use is the API-Password you find in your "My Account" page') + self.wrongPassword() diff --git a/pyload/plugins/account/NetloadIn.py b/pyload/plugins/account/NetloadIn.py new file mode 100644 index 000000000..01b09c5d8 --- /dev/null +++ b/pyload/plugins/account/NetloadIn.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- + +import re +from time import time + +from pyload.plugins.base.Account import Account + + +class NetloadIn(Account): + __name__ = "NetloadIn" + __type__ = "account" + __version__ = "0.22" + + __description__ = """Netload.in account plugin""" + __author_name__ = ("RaNaN", "CryNickSystems") + __author_mail__ = ("RaNaN@pyload.org", "webmaster@pcProfil.de") + + + def loadAccountInfo(self, user, req): + page = req.load("http://netload.in/index.php?id=2&lang=de") + left = r">(\d+) (Tag|Tage), (\d+) Stunden<" + left = re.search(left, page) + if left: + validuntil = time() + int(left.group(1)) * 24 * 60 * 60 + int(left.group(3)) * 60 * 60 + trafficleft = -1 + premium = True + else: + validuntil = None + premium = False + trafficleft = None + return {"validuntil": validuntil, "trafficleft": trafficleft, "premium": premium} + + def login(self, user, data, req): + page = req.load("http://netload.in/index.php", None, + {"txtuser": user, "txtpass": data['password'], "txtcheck": "login", "txtlogin": "Login"}, + cookies=True) + if "password or it might be invalid!" in page: + self.wrongPassword() diff --git a/pyload/plugins/account/OboomCom.py b/pyload/plugins/account/OboomCom.py new file mode 100644 index 000000000..14bdd1510 --- /dev/null +++ b/pyload/plugins/account/OboomCom.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- + +import time + +from beaker.crypto.pbkdf2 import PBKDF2 + +from pyload.utils import json_loads +from pyload.plugins.base.Account import Account + + +class OboomCom(Account): + __name__ = "OboomCom" + __type__ = "account" + __version__ = "0.1" + + __description__ = """Oboom.com account plugin""" + __author_name__ = "stanley" + __author_mail__ = "stanley.foerster@gmail.com" + + + def loadAccountData(self, user, req): + passwd = self.getAccountData(user)['password'] + salt = passwd[::-1] + pbkdf2 = PBKDF2(passwd, salt, 1000).hexread(16) + result = json_loads(req.load("https://www.oboom.com/1.0/login", get={"auth": user, "pass": pbkdf2})) + if not result[0] == 200: + self.logWarning("Failed to log in: %s" % result[1]) + self.wrongPassword() + return result[1] + + def loadAccountInfo(self, name, req): + accountData = self.loadAccountData(name, req) + userData = accountData['user'] + + if "premium_unix" in userData: + validUntilUtc = int(userData['premium_unix']) + if validUntilUtc > int(time.time()): + premium = True + validUntil = validUntilUtc + traffic = userData['traffic'] + trafficLeft = traffic['current'] + maxTraffic = traffic['max'] + session = accountData['session'] + return {"premium": premium, + "validuntil": validUntil, + "trafficleft": trafficLeft / 1024, + "maxtraffic": maxTraffic / 1024, + "session": session + } + return {"premium": False, "validuntil": -1} + + def login(self, user, data, req): + self.loadAccountData(user, req) diff --git a/pyload/plugins/account/OneFichierCom.py b/pyload/plugins/account/OneFichierCom.py new file mode 100644 index 000000000..efb563a60 --- /dev/null +++ b/pyload/plugins/account/OneFichierCom.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- + +import re +from time import strptime, mktime +from pycurl import REFERER + +from pyload.plugins.base.Account import Account + + +class OneFichierCom(Account): + __name__ = "OneFichierCom" + __type__ = "account" + __version__ = "0.1" + + __description__ = """1fichier.com account plugin""" + __author_name__ = "Elrick69" + __author_mail__ = "elrick69[AT]rocketmail[DOT]com" + + VALID_UNTIL_PATTERN = r'You are a premium user until (?P<d>\d{2})/(?P<m>\d{2})/(?P<y>\d{4})' + + + def loadAccountInfo(self, user, req): + + html = req.load("http://1fichier.com/console/abo.pl") + + m = re.search(self.VALID_UNTIL_PATTERN, html) + + if m: + premium = True + validuntil = re.sub(self.VALID_UNTIL_PATTERN, '\g<d>/\g<m>/\g<y>', m.group(0)) + validuntil = int(mktime(strptime(validuntil, "%d/%m/%Y"))) + else: + premium = False + validuntil = -1 + + return {"premium": premium, "trafficleft": -1, "validuntil": validuntil} + + def login(self, user, data, req): + + req.http.c.setopt(REFERER, "http://1fichier.com/login.pl?lg=en") + + html = req.load("http://1fichier.com/login.pl?lg=en", post={ + "mail": user, + "pass": data['password'], + "Login": "Login"}) + + if r'<div class="error_message">Invalid username or password.</div>' in html: + self.wrongPassword() diff --git a/pyload/plugins/account/OverLoadMe.py b/pyload/plugins/account/OverLoadMe.py new file mode 100644 index 000000000..4fe59706c --- /dev/null +++ b/pyload/plugins/account/OverLoadMe.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- + +from pyload.plugins.base.Account import Account +from pyload.utils import json_loads + + +class OverLoadMe(Account): + __name__ = "OverLoadMe" + __type__ = "account" + __version__ = "0.01" + + __description__ = """Over-Load.me account plugin""" + __author_name__ = "marley" + __author_mail__ = "marley@over-load.me" + + + def loadAccountInfo(self, user, req): + data = self.getAccountData(user) + page = req.load("https://api.over-load.me/account.php", get={"user": user, "auth": data['password']}).strip() + data = json_loads(page) + + # Check for premium + if data['membership'] == "Free": + return {"premium": False} + + account_info = {"validuntil": data['expirationunix'], "trafficleft": -1} + return account_info + + def login(self, user, data, req): + jsondata = req.load("https://api.over-load.me/account.php", + get={"user": user, "auth": data['password']}).strip() + data = json_loads(jsondata) + + if data['err'] == 1: + self.wrongPassword() diff --git a/pyload/plugins/account/PremiumTo.py b/pyload/plugins/account/PremiumTo.py new file mode 100644 index 000000000..75c950263 --- /dev/null +++ b/pyload/plugins/account/PremiumTo.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- + +from pyload.plugins.base.Account import Account + + +class PremiumTo(Account): + __name__ = "PremiumTo" + __type__ = "account" + __version__ = "0.04" + + __description__ = """Premium.to account plugin""" + __author_name__ = ("RaNaN", "zoidberg", "stickell") + __author_mail__ = ("RaNaN@pyload.org", "zoidberg@mujmail.cz", "l.stickell@yahoo.it") + + + def loadAccountInfo(self, user, req): + api_r = req.load("http://premium.to/api/straffic.php", + get={'username': self.username, 'password': self.password}) + traffic = sum(map(int, api_r.split(';'))) + + return {"trafficleft": int(traffic) / 1024, "validuntil": -1} + + def login(self, user, data, req): + self.username = user + self.password = data['password'] + authcode = req.load("http://premium.to/api/getauthcode.php?username=%s&password=%s" % ( + user, self.password)).strip() + + if "wrong username" in authcode: + self.wrongPassword() diff --git a/pyload/plugins/account/PremiumizeMe.py b/pyload/plugins/account/PremiumizeMe.py new file mode 100644 index 000000000..1beb950ae --- /dev/null +++ b/pyload/plugins/account/PremiumizeMe.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- + +from pyload.plugins.base.Account import Account + +from pyload.utils import json_loads + + +class PremiumizeMe(Account): + __name__ = "PremiumizeMe" + __type__ = "account" + __version__ = "0.11" + + __description__ = """Premiumize.me account plugin""" + __author_name__ = "Florian Franzen" + __author_mail__ = "FlorianFranzen@gmail.com" + + + def loadAccountInfo(self, user, req): + # 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": max(0, status['result']['trafficleft_bytes'] / 1024)} + + if status['result']['type'] == 'free': + account_info['premium'] = False + + return account_info + + def login(self, user, data, req): + # Get user data from premiumize.me + status = self.getAccountStatus(user, req) + + # Check if user and password are valid + if status['status'] != 200: + self.wrongPassword() + + def getAccountStatus(self, user, req): + # 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¶ms[login]=%s¶ms[pass]=%s" % ( + user, self.accounts[user]['password'])) + return json_loads(answer) diff --git a/pyload/plugins/account/QuickshareCz.py b/pyload/plugins/account/QuickshareCz.py new file mode 100644 index 000000000..0d677eecb --- /dev/null +++ b/pyload/plugins/account/QuickshareCz.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- + +import re +from pyload.plugins.base.Account import Account +from pyload.utils import parseFileSize + + +class QuickshareCz(Account): + __name__ = "QuickshareCz" + __type__ = "account" + __version__ = "0.01" + + __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) + + m = re.search(r'Stav kreditu: <strong>(.+?)</strong>', html) + if m: + trafficleft = parseFileSize(m.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() diff --git a/pyload/plugins/account/RPNetBiz.py b/pyload/plugins/account/RPNetBiz.py new file mode 100644 index 000000000..c10122053 --- /dev/null +++ b/pyload/plugins/account/RPNetBiz.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- + +from pyload.plugins.base.Account import Account +from pyload.utils import json_loads + + +class RPNetBiz(Account): + __name__ = "RPNetBiz" + __type__ = "account" + __version__ = "0.1" + + __description__ = """RPNet.biz account plugin""" + __author_name__ = "Dman" + __author_mail__ = "dmanugm@gmail.com" + + + def loadAccountInfo(self, user, req): + # Get account information from rpnet.biz + response = self.getAccountStatus(user, req) + try: + if response['accountInfo']['isPremium']: + # Parse account info. Change the trafficleft later to support per host info. + account_info = {"validuntil": int(response['accountInfo']['premiumExpiry']), + "trafficleft": -1, "premium": True} + else: + account_info = {"validuntil": None, "trafficleft": None, "premium": False} + + except KeyError: + #handle wrong password exception + account_info = {"validuntil": None, "trafficleft": None, "premium": False} + + return account_info + + def login(self, user, data, req): + # Get account information from rpnet.biz + response = self.getAccountStatus(user, req) + + # If we have an error in the response, we have wrong login information + if 'error' in response: + self.wrongPassword() + + def getAccountStatus(self, user, req): + # Using the rpnet API, check if valid premium account + response = req.load("https://premium.rpnet.biz/client_api.php", + get={"username": user, "password": self.accounts[user]['password'], + "action": "showAccountInformation"}) + self.logDebug("JSON data: %s" % response) + + return json_loads(response) diff --git a/pyload/plugins/account/RapidgatorNet.py b/pyload/plugins/account/RapidgatorNet.py new file mode 100644 index 000000000..2c2fd493e --- /dev/null +++ b/pyload/plugins/account/RapidgatorNet.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- + +from pyload.plugins.base.Account import Account +from pyload.utils import json_loads + + +class RapidgatorNet(Account): + __name__ = "RapidgatorNet" + __type__ = "account" + __version__ = "0.04" + + __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": int(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() diff --git a/pyload/plugins/account/RapidshareCom.py b/pyload/plugins/account/RapidshareCom.py new file mode 100644 index 000000000..9f1670cb8 --- /dev/null +++ b/pyload/plugins/account/RapidshareCom.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- + +from pyload.plugins.base.Account import Account + + +class RapidshareCom(Account): + __name__ = "RapidshareCom" + __type__ = "account" + __version__ = "0.22" + + __description__ = """Rapidshare.com account plugin""" + __author_name__ = "mkaay" + __author_mail__ = "mkaay@mkaay.de" + + + def loadAccountInfo(self, user, req): + data = self.getAccountData(user) + api_url_base = "http://api.rapidshare.com/cgi-bin/rsapi.cgi" + api_param_prem = {"sub": "getaccountdetails", "type": "prem", "login": user, + "password": data['password'], "withcookie": 1} + src = req.load(api_url_base, cookies=False, get=api_param_prem) + if src.startswith("ERROR"): + raise Exception(src) + fields = src.split("\n") + info = {} + for t in fields: + if not t.strip(): + continue + k, v = t.split("=") + info[k] = v + + validuntil = int(info['billeduntil']) + premium = True if validuntil else False + + tmp = {"premium": premium, "validuntil": validuntil, "trafficleft": -1, "maxtraffic": -1} + + return tmp + + def login(self, user, data, req): + api_url_base = "http://api.rapidshare.com/cgi-bin/rsapi.cgi" + api_param_prem = {"sub": "getaccountdetails", "type": "prem", "login": user, + "password": data['password'], "withcookie": 1} + src = req.load(api_url_base, cookies=False, get=api_param_prem) + if src.startswith("ERROR"): + raise Exception(src + "### Note you have to use your account number for login, instead of name.") + fields = src.split("\n") + info = {} + for t in fields: + if not t.strip(): + continue + k, v = t.split("=") + info[k] = v + cj = self.getAccountCookies(user) + cj.setCookie("rapidshare.com", "enc", info['cookie']) diff --git a/pyload/plugins/account/RarefileNet.py b/pyload/plugins/account/RarefileNet.py new file mode 100644 index 000000000..68e2595e2 --- /dev/null +++ b/pyload/plugins/account/RarefileNet.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- + +from pyload.plugins.internal.XFSPAccount import XFSPAccount + + +class RarefileNet(XFSPAccount): + __name__ = "RarefileNet" + __type__ = "account" + __version__ = "0.02" + + __description__ = """RareFile.net account plugin""" + __author_name__ = "zoidberg" + __author_mail__ = "zoidberg@mujmail.cz" + + MAIN_PAGE = "http://rarefile.net/" diff --git a/pyload/plugins/account/RealdebridCom.py b/pyload/plugins/account/RealdebridCom.py new file mode 100644 index 000000000..737f22acf --- /dev/null +++ b/pyload/plugins/account/RealdebridCom.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- + +import xml.dom.minidom as dom + +from pyload.plugins.base.Account import Account + + +class RealdebridCom(Account): + __name__ = "RealdebridCom" + __type__ = "account" + __version__ = "0.43" + + __description__ = """Real-Debrid.com account plugin""" + __author_name__ = "Devirex Hazzard" + __author_mail__ = "naibaf_11@yahoo.de" + + + def loadAccountInfo(self, user, req): + if self.pin_code: + return {"premium": False} + page = req.load("https://real-debrid.com/api/account.php") + xml = dom.parseString(page) + account_info = {"validuntil": int(xml.getElementsByTagName("expiration")[0].childNodes[0].nodeValue), + "trafficleft": -1} + + return account_info + + def login(self, user, data, req): + self.pin_code = False + page = req.load("https://real-debrid.com/ajax/login.php", get={"user": user, "pass": data['password']}) + if "Your login informations are incorrect" in page: + self.wrongPassword() + elif "PIN Code required" in page: + self.logWarning("PIN code required. Please login to https://real-debrid.com using the PIN or disable the double authentication in your control panel on https://real-debrid.com.") + self.pin_code = True diff --git a/pyload/plugins/account/RehostTo.py b/pyload/plugins/account/RehostTo.py new file mode 100644 index 000000000..0414ad581 --- /dev/null +++ b/pyload/plugins/account/RehostTo.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- + +from pyload.plugins.base.Account import Account + + +class RehostTo(Account): + __name__ = "RehostTo" + __type__ = "account" + __version__ = "0.1" + + __description__ = """Rehost.to account plugin""" + __author_name__ = "RaNaN" + __author_mail__ = "RaNaN@pyload.org" + + + def loadAccountInfo(self, user, req): + data = self.getAccountData(user) + page = req.load("http://rehost.to/api.php?cmd=login&user=%s&pass=%s" % (user, data['password'])) + data = [x.split("=") for x in page.split(",")] + ses = data[0][1] + long_ses = data[1][1] + + page = req.load("http://rehost.to/api.php?cmd=get_premium_credits&long_ses=%s" % long_ses) + traffic, valid = page.split(",") + + account_info = {"trafficleft": int(traffic) * 1024, + "validuntil": int(valid), + "long_ses": long_ses, + "ses": ses} + + return account_info + + def login(self, user, data, req): + page = req.load("http://rehost.to/api.php?cmd=login&user=%s&pass=%s" % (user, data['password'])) + + if "Login failed." in page: + self.wrongPassword() diff --git a/pyload/plugins/account/RyushareCom.py b/pyload/plugins/account/RyushareCom.py new file mode 100644 index 000000000..74258e984 --- /dev/null +++ b/pyload/plugins/account/RyushareCom.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- + +from pyload.plugins.internal.XFSPAccount import XFSPAccount + + +class RyushareCom(XFSPAccount): + __name__ = "RyushareCom" + __type__ = "account" + __version__ = "0.03" + + __description__ = """Ryushare.com account plugin""" + __author_name__ = ("zoidberg", "trance4us") + __author_mail__ = ("zoidberg@mujmail.cz", "") + + MAIN_PAGE = "http://ryushare.com/" + + + def login(self, user, data, req): + req.lastURL = "http://ryushare.com/login.python" + html = req.load("http://ryushare.com/login.python", + post={"login": user, "password": data['password'], "op": "login"}) + if 'Incorrect Login or Password' in html or '>Error<' in html: + self.wrongPassword() diff --git a/pyload/plugins/account/ShareRapidCom.py b/pyload/plugins/account/ShareRapidCom.py new file mode 100644 index 000000000..2cd955bbe --- /dev/null +++ b/pyload/plugins/account/ShareRapidCom.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- + +import re + +from time import mktime, strptime +from pyload.plugins.base.Account import Account + + +class ShareRapidCom(Account): + __name__ = "ShareRapidCom" + __type__ = "account" + __version__ = "0.34" + + __description__ = """MegaRapid.cz account plugin""" + __author_name__ = ("MikyWoW", "zoidberg") + __author_mail__ = ("mikywow@seznam.cz", "zoidberg@mujmail.cz") + + login_timeout = 60 + + + def loadAccountInfo(self, user, req): + src = req.load("http://megarapid.cz/mujucet/", decode=True) + + m = re.search(ur'<td>Max. počet paralelních stahování: </td><td>(\d+)', src) + if m: + data = self.getAccountData(user) + data['options']['limitDL'] = [int(m.group(1))] + + m = re.search(ur'<td>Paušální stahování aktivní. Vyprší </td><td><strong>(.*?)</strong>', src) + if m: + validuntil = mktime(strptime(m.group(1), "%d.%m.%Y - %H:%M")) + return {"premium": True, "trafficleft": -1, "validuntil": validuntil} + + m = re.search(r'<tr><td>Kredit</td><td>(.*?) GiB', src) + 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/", cookies=True) + 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"}, cookies=True) diff --git a/pyload/plugins/account/ShareonlineBiz.py b/pyload/plugins/account/ShareonlineBiz.py new file mode 100644 index 000000000..ff0cb1c58 --- /dev/null +++ b/pyload/plugins/account/ShareonlineBiz.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- + +from pyload.plugins.base.Account import Account + + +class ShareonlineBiz(Account): + __name__ = "ShareonlineBiz" + __type__ = "account" + __version__ = "0.24" + + __description__ = """Share-online.biz account plugin""" + __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(): + 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} + + def login(self, user, data, req): + src = self.getUserAPI(user, req) + if "EXCEPTION" in src: + self.wrongPassword() diff --git a/pyload/plugins/account/SimplyPremiumCom.py b/pyload/plugins/account/SimplyPremiumCom.py new file mode 100644 index 000000000..e9126a5cb --- /dev/null +++ b/pyload/plugins/account/SimplyPremiumCom.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- + +from pyload.utils import json_loads +from pyload.plugins.base.Account import Account + + +class SimplyPremiumCom(Account): + __name__ = "SimplyPremiumCom" + __type__ = "account" + __version__ = "0.01" + + __description__ = """Simply-Premium.com account plugin""" + __author_name__ = "EvolutionClip" + __author_mail__ = "evolutionclip@live.de" + + + def loadAccountInfo(self, user, req): + json_data = req.load('http://www.simply-premium.com/api/user.php?format=json') + self.logDebug("JSON data: " + json_data) + json_data = json_loads(json_data) + + if 'vip' in json_data['result'] and json_data['result']['vip'] == 0: + return {"premium": False} + + #Time package + validuntil = float(json_data['result']['timeend']) + #Traffic package + # {"trafficleft": int(traffic) / 1024, "validuntil": -1} + #trafficleft = int(json_data['result']['traffic'] / 1024) + + #return {"premium": True, "validuntil": validuntil, "trafficleft": trafficleft} + return {"premium": True, "validuntil": validuntil} + + def login(self, user, data, req): + req.cj.setCookie("simply-premium.com", "lang", "EN") + + if data['password'] == '' or data['password'] == '0': + post_data = {"key": user} + else: + post_data = {"login_name": user, "login_pass": data['password']} + + html = req.load("http://www.simply-premium.com/login.php", post=post_data) + + if 'logout' not in html: + self.wrongPassword() diff --git a/pyload/plugins/account/SimplydebridCom.py b/pyload/plugins/account/SimplydebridCom.py new file mode 100644 index 000000000..4af8eaa31 --- /dev/null +++ b/pyload/plugins/account/SimplydebridCom.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- + +from time import mktime, strptime + +from pyload.plugins.base.Account import Account + + +class SimplydebridCom(Account): + __name__ = "SimplydebridCom" + __type__ = "account" + __version__ = "0.1" + + __description__ = """Simply-Debrid.com account plugin""" + __author_name__ = "Kagenoshin" + __author_mail__ = "kagenoshin@gmx.ch" + + + def loadAccountInfo(self, user, req): + get_data = {'login': 2, 'u': self.loginname, 'p': self.password} + response = req.load("http://simply-debrid.com/api.php", get=get_data, decode=True) + data = [x.strip() for x in response.split(";")] + if str(data[0]) != "1": + return {"premium": False} + else: + return {"trafficleft": -1, "validuntil": mktime(strptime(str(data[2]), "%d/%m/%Y"))} + + def login(self, user, data, req): + self.loginname = user + self.password = data['password'] + get_data = {'login': 1, 'u': self.loginname, 'p': self.password} + response = req.load("http://simply-debrid.com/api.php", get=get_data, decode=True) + if response != "02: loggin success": + self.wrongPassword() diff --git a/pyload/plugins/account/StahnuTo.py b/pyload/plugins/account/StahnuTo.py new file mode 100644 index 000000000..ba4a3fcdd --- /dev/null +++ b/pyload/plugins/account/StahnuTo.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- + +import re + +from pyload.plugins.base.Account import Account +from pyload.utils import parseFileSize + + +class StahnuTo(Account): + __name__ = "StahnuTo" + __type__ = "account" + __version__ = "0.02" + + __description__ = """StahnuTo account plugin""" + __author_name__ = "zoidberg" + __author_mail__ = "zoidberg@mujmail.cz" + + + def loadAccountInfo(self, user, req): + html = req.load("http://www.stahnu.to/") + + m = re.search(r'>VIP: (\d+.*)<', html) + trafficleft = parseFileSize(m.group(1)) * 1024 if m else 0 + + return {"premium": trafficleft > (512 * 1024), "trafficleft": trafficleft, "validuntil": -1} + + def login(self, user, data, req): + html = req.load("http://www.stahnu.to/login.php", post={ + "username": user, + "password": data['password'], + "submit": "Login"}) + + if not '<a href="logout.php">' in html: + self.wrongPassword() diff --git a/pyload/plugins/account/TurbobitNet.py b/pyload/plugins/account/TurbobitNet.py new file mode 100644 index 000000000..ba172d67e --- /dev/null +++ b/pyload/plugins/account/TurbobitNet.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- + +import re +from time import mktime, strptime + +from pyload.plugins.base.Account import Account + + +class TurbobitNet(Account): + __name__ = "TurbobitNet" + __type__ = "account" + __version__ = "0.01" + + __description__ = """TurbobitNet account plugin""" + __author_name__ = "zoidberg" + __author_mail__ = "zoidberg@mujmail.cz" + + + def loadAccountInfo(self, user, req): + html = req.load("http://turbobit.net") + + m = re.search(r'<u>Turbo Access</u> to ([0-9.]+)', html) + if m: + premium = True + validuntil = mktime(strptime(m.group(1), "%d.%m.%Y")) + else: + premium = False + validuntil = -1 + + return {"premium": premium, "trafficleft": -1, "validuntil": validuntil} + + def login(self, user, data, req): + req.cj.setCookie("turbobit.net", "user_lang", "en") + + html = req.load("http://turbobit.net/user/login", post={ + "user[login]": user, + "user[pass]": data['password'], + "user[submit]": "Login"}) + + if not '<div class="menu-item user-name">' in html: + self.wrongPassword() diff --git a/pyload/plugins/account/TusfilesNet.py b/pyload/plugins/account/TusfilesNet.py new file mode 100644 index 000000000..c4d912022 --- /dev/null +++ b/pyload/plugins/account/TusfilesNet.py @@ -0,0 +1,69 @@ +# -*- coding: utf-8 -*- + +import re + +from time import mktime, strptime, gmtime + +from pyload.plugins.base.Account import Account +from pyload.plugins.internal.SimpleHoster import parseHtmlForm +from pyload.utils import parseFileSize + + +class TusfilesNet(Account): + __name__ = "TusfilesNet" + __type__ = "account" + __version__ = "0.01" + + __description__ = """ Tusfile.net account plugin """ + __author_name__ = "guidobelix" + __author_mail__ = "guidobelix@hotmail.it" + + VALID_UNTIL_PATTERN = r'<span class="label label-default">([^<]+)</span>' + TRAFFIC_LEFT_PATTERN = r'<td><img src="//www.tusfiles.net/i/icon/meter.png" alt=""/></td>\n<td> (?P<S>[^<]+)</td>' + + + def loadAccountInfo(self, user, req): + html = req.load("http://www.tusfiles.net/?op=my_account", decode=True) + + validuntil = None + trafficleft = None + premium = False + + m = re.search(self.VALID_UNTIL_PATTERN, html) + if m: + expiredate = m.group(1) + self.logDebug("Expire date: " + expiredate) + + try: + validuntil = mktime(strptime(expiredate, "%d %B %Y")) + except Exception, e: + self.logError(e) + + if validuntil > mktime(gmtime()): + premium = True + else: + premium = False + validuntil = None + + m = re.search(self.TRAFFIC_LEFT_PATTERN, html) + if m: + trafficleft = m.group(1) + if "Unlimited" in trafficleft: + trafficleft = -1 + else: + trafficleft = parseFileSize(trafficleft) * 1024 + + return {'validuntil': validuntil, 'trafficleft': trafficleft, 'premium': premium} + + + def login(self, user, data, req): + html = req.load("http://www.tusfiles.net/login.html", decode=True) + action, inputs = parseHtmlForm('name="FL"', html) + inputs.update({'login': user, + 'password': data['password'], + 'redirect': "http://www.tusfiles.net/"}) + + html = req.load("http://www.tusfiles.net/", post=inputs, decode=True) + + if 'Incorrect Login or Password' in html or '>Error<' in html: + self.wrongPassword() diff --git a/pyload/plugins/account/UlozTo.py b/pyload/plugins/account/UlozTo.py new file mode 100644 index 000000000..214607998 --- /dev/null +++ b/pyload/plugins/account/UlozTo.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- + +import re + +from pyload.plugins.base.Account import Account + + +class UlozTo(Account): + __name__ = "UlozTo" + __type__ = "account" + __version__ = "0.06" + + __description__ = """Uloz.to account plugin""" + __author_name__ = ("zoidberg", "pulpe") + __author_mail__ = "zoidberg@mujmail.cz" + + TRAFFIC_LEFT_PATTERN = r'<li class="menu-kredit"><a href="/kredit" title="[^"]*?GB = ([0-9.]+) MB"' + + + def loadAccountInfo(self, user, req): + #this cookie gets lost somehow after each request + self.phpsessid = req.cj.getCookie("ULOSESSID") + html = req.load("http://www.ulozto.net/", decode=True) + req.cj.setCookie("www.ulozto.net", "ULOSESSID", self.phpsessid) + + m = re.search(self.TRAFFIC_LEFT_PATTERN, html) + trafficleft = int(float(m.group(1).replace(' ', '').replace(',', '.')) * 1000 * 1.048) if m else 0 + self.premium = True if trafficleft else False + + return {"validuntil": -1, "trafficleft": trafficleft} + + def login(self, user, data, req): + login_page = req.load('http://www.ulozto.net/?do=web-login', decode=True) + action = re.findall('<form action="(.+?)"', login_page)[1].replace('&', '&') + token = re.search('_token_" value="(.+?)"', login_page).group(1) + + html = req.load('http://www.ulozto.net'+action, post={ + "_token_": token, + "login": "Submit", + "password": data['password'], + "username": user + }, decode=True) + + if '<div class="flash error">' in html: + self.wrongPassword() diff --git a/pyload/plugins/account/UnrestrictLi.py b/pyload/plugins/account/UnrestrictLi.py new file mode 100644 index 000000000..a93e88e2d --- /dev/null +++ b/pyload/plugins/account/UnrestrictLi.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- + +from pyload.plugins.base.Account import Account +from pyload.utils import json_loads + + +class UnrestrictLi(Account): + __name__ = "UnrestrictLi" + __type__ = "account" + __version__ = "0.03" + + __description__ = """Unrestrict.li account plugin""" + __author_name__ = "stickell" + __author_mail__ = "l.stickell@yahoo.it" + + + def loadAccountInfo(self, user, req): + json_data = req.load('http://unrestrict.li/api/jdownloader/user.php?format=json') + self.logDebug("JSON data: " + json_data) + json_data = json_loads(json_data) + + if 'vip' in json_data['result'] and json_data['result']['vip'] == 0: + return {"premium": False} + + validuntil = json_data['result']['expires'] + trafficleft = int(json_data['result']['traffic'] / 1024) + + return {"premium": True, "validuntil": validuntil, "trafficleft": trafficleft} + + def login(self, user, data, req): + req.cj.setCookie("unrestrict.li", "lang", "EN") + html = req.load("https://unrestrict.li/sign_in") + + if 'solvemedia' in html: + self.logError("A Captcha is required. Go to http://unrestrict.li/sign_in and login, then retry") + return + + post_data = {"username": user, "password": data['password'], + "remember_me": "remember", "signin": "Sign in"} + html = req.load("https://unrestrict.li/sign_in", post=post_data) + + if 'sign_out' not in html: + self.wrongPassword() diff --git a/pyload/plugins/account/UploadedTo.py b/pyload/plugins/account/UploadedTo.py new file mode 100644 index 000000000..2ef0117f7 --- /dev/null +++ b/pyload/plugins/account/UploadedTo.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- + +import re +from time import time + +from pyload.plugins.base.Account import Account + + +class UploadedTo(Account): + __name__ = "UploadedTo" + __type__ = "account" + __version__ = "0.26" + + __description__ = """Uploaded.to account plugin""" + __author_name__ = "mkaay" + __author_mail__ = "mkaay@mkaay.de" + + + def loadAccountInfo(self, user, req): + + req.load("http://uploaded.net/language/en") + html = req.load("http://uploaded.net/me") + + premium = '<a href="register"><em>Premium</em>' in html or '<em>Premium</em></th>' in html + + if premium: + raw_traffic = re.search(r'<th colspan="2"><b class="cB">([^<]+)', html).group(1).replace('.', '') + raw_valid = re.search(r"<td>Duration:</td>\s*<th>([^<]+)", html, re.MULTILINE).group(1).strip() + + traffic = int(self.parseTraffic(raw_traffic)) + + if raw_valid == "unlimited": + validuntil = -1 + else: + raw_valid = re.findall(r"(\d+) (Week|weeks|days|day|hours|hour)", raw_valid) + validuntil = time() + for n, u in raw_valid: + validuntil += int(n) * 60 * 60 * {"Week": 168, "weeks": 168, "days": 24, + "day": 24, "hours": 1, "hour": 1}[u] + + return {"validuntil": validuntil, "trafficleft": traffic, "maxtraffic": 50 * 1024 * 1024} + else: + return {"premium": False, "validuntil": -1} + + def login(self, user, data, req): + + req.load("http://uploaded.net/language/en") + req.cj.setCookie("uploaded.net", "lang", "en") + + page = req.load("http://uploaded.net/io/login", post={"id": user, "pw": data['password'], "_": ""}) + + if "User and password do not match!" in page: + self.wrongPassword() diff --git a/pyload/plugins/account/UploadheroCom.py b/pyload/plugins/account/UploadheroCom.py new file mode 100644 index 000000000..4cea86e35 --- /dev/null +++ b/pyload/plugins/account/UploadheroCom.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- + +import re +import datetime +import time + +from pyload.plugins.base.Account import Account + + +class UploadheroCom(Account): + __name__ = "UploadheroCom" + __type__ = "account" + __version__ = "0.2" + + __description__ = """Uploadhero.co account plugin""" + __author_name__ = "mcmyst" + __author_mail__ = "mcmyst@hotmail.fr" + + + def loadAccountInfo(self, user, req): + premium_pattern = re.compile('Il vous reste <span class="bleu">([0-9]+)</span> jours premium.') + + data = self.getAccountData(user) + page = req.load("http://uploadhero.co/my-account") + + if premium_pattern.search(page): + end_date = datetime.date.today() + datetime.timedelta(days=int(premium_pattern.search(page).group(1))) + end_date = time.mktime(future.timetuple()) + account_info = {"validuntil": end_date, "trafficleft": -1, "premium": True} + else: + account_info = {"validuntil": -1, "trafficleft": -1, "premium": False} + + return account_info + + def login(self, user, data, req): + page = req.load("http://uploadhero.co/lib/connexion.php", + post={"pseudo_login": user, "password_login": data['password']}) + + if "mot de passe invalide" in page: + self.wrongPassword() diff --git a/pyload/plugins/account/UploadingCom.py b/pyload/plugins/account/UploadingCom.py new file mode 100644 index 000000000..0f7d33ec8 --- /dev/null +++ b/pyload/plugins/account/UploadingCom.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- + +from time import time, strptime, mktime +import re + +from pyload.plugins.base.Account import Account + + +class UploadingCom(Account): + __name__ = "UploadingCom" + __type__ = "account" + __version__ = "0.1" + + __description__ = """Uploading.com account plugin""" + __author_name__ = "mkaay" + __author_mail__ = "mkaay@mkaay.de" + + + def loadAccountInfo(self, user, req): + src = req.load("http://uploading.com/") + premium = True + if "UPGRADE TO PREMIUM" in src: + return {"validuntil": -1, "trafficleft": -1, "premium": False} + + m = re.search("Valid Until:(.*?)<", src) + if m: + validuntil = int(mktime(strptime(m.group(1).strip(), "%b %d, %Y"))) + else: + validuntil = -1 + + return {"validuntil": validuntil, "trafficleft": -1, "premium": True} + + def login(self, user, data, req): + req.cj.setCookie("uploading.com", "lang", "1") + req.cj.setCookie("uploading.com", "language", "1") + req.cj.setCookie("uploading.com", "setlang", "en") + req.cj.setCookie("uploading.com", "_lang", "en") + req.load("http://uploading.com/") + req.load("http://uploading.com/general/login_form/?JsHttpRequest=%s-xml" % long(time() * 1000), + post={"email": user, "password": data['password'], "remember": "on"}) diff --git a/pyload/plugins/account/UptoboxCom.py b/pyload/plugins/account/UptoboxCom.py new file mode 100644 index 000000000..7f9618da8 --- /dev/null +++ b/pyload/plugins/account/UptoboxCom.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- + +from pyload.plugins.internal.XFSPAccount import XFSPAccount + + +class UptoboxCom(XFSPAccount): + __name__ = "UptoboxCom" + __type__ = "account" + __version__ = "0.02" + + __description__ = """DDLStorage.com account plugin""" + __author_name__ = "zoidberg" + __author_mail__ = "zoidberg@mujmail.cz" + + MAIN_PAGE = "http://uptobox.com/" + + VALID_UNTIL_PATTERN = r'>Premium.[Aa]ccount expire: ([^<]+)</strong>' diff --git a/pyload/plugins/account/YibaishiwuCom.py b/pyload/plugins/account/YibaishiwuCom.py new file mode 100644 index 000000000..6cb595d06 --- /dev/null +++ b/pyload/plugins/account/YibaishiwuCom.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- + +import re + +from pyload.plugins.base.Account import Account + + +class YibaishiwuCom(Account): + __name__ = "YibaishiwuCom" + __type__ = "account" + __version__ = "0.01" + + __description__ = """115.com account plugin""" + __author_name__ = "zoidberg" + __author_mail__ = "zoidberg@mujmail.cz" + + ACCOUNT_INFO_PATTERN = r'var USER_PERMISSION = {(.*?)}' + + + def loadAccountInfo(self, user, req): + #self.relogin(user) + html = req.load("http://115.com/", decode=True) + + m = re.search(self.ACCOUNT_INFO_PATTERN, html, re.S) + premium = True if (m and 'is_vip: 1' in m.group(1)) else False + validuntil = trafficleft = (-1 if m else 0) + return dict({"validuntil": validuntil, "trafficleft": trafficleft, "premium": premium}) + + def login(self, user, data, req): + html = req.load('http://passport.115.com/?ac=login', post={ + "back": "http://www.115.com/", + "goto": "http://115.com/", + "login[account]": user, + "login[passwd]": data['password'] + }, decode=True) + + if not 'var USER_PERMISSION = {' in html: + self.wrongPassword() diff --git a/pyload/plugins/account/ZeveraCom.py b/pyload/plugins/account/ZeveraCom.py new file mode 100644 index 000000000..6d70a2e6b --- /dev/null +++ b/pyload/plugins/account/ZeveraCom.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- + +from time import mktime, strptime + +from pyload.plugins.base.Account import Account + + +class ZeveraCom(Account): + __name__ = "ZeveraCom" + __type__ = "account" + __version__ = "0.21" + + __description__ = """Zevera.com account plugin""" + __author_name__ = "zoidberg" + __author_mail__ = "zoidberg@mujmail.cz" + + + def loadAccountInfo(self, user, req): + data = self.getAPIData(req) + if data == "No traffic": + account_info = {"trafficleft": 0, "validuntil": 0, "premium": False} + else: + account_info = { + "trafficleft": int(data['availabletodaytraffic']) * 1024, + "validuntil": mktime(strptime(data['endsubscriptiondate'], "%Y/%m/%d %H:%M:%S")), + "premium": True + } + return account_info + + def login(self, user, data, req): + self.loginname = user + self.password = data['password'] + if self.getAPIData(req) == "No traffic": + self.wrongPassword() + + def getAPIData(self, req, just_header=False, **kwargs): + get_data = { + 'cmd': 'accountinfo', + 'login': self.loginname, + 'pass': self.password + } + get_data.update(kwargs) + + response = req.load("http://www.zevera.com/jDownloader.ashx", get=get_data, + decode=True, just_header=just_header) + self.logDebug(response) + + if ':' in response: + if not just_header: + response = response.replace(',', '\n') + return dict((y.strip().lower(), z.strip()) for (y, z) in + [x.split(':', 1) for x in response.splitlines() if ':' in x]) + else: + return response diff --git a/pyload/plugins/account/__init__.py b/pyload/plugins/account/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/pyload/plugins/accounts/AlldebridCom.py b/pyload/plugins/accounts/AlldebridCom.py deleted file mode 100644 index 71905d8ef..000000000 --- a/pyload/plugins/accounts/AlldebridCom.py +++ /dev/null @@ -1,58 +0,0 @@ -# -*- coding: utf-8 -*- - -import re -import xml.dom.minidom as dom - -from time import time -from urllib import urlencode - -from BeautifulSoup import BeautifulSoup - -from pyload.plugins.base.Account import Account - - -class AlldebridCom(Account): - __name__ = "AlldebridCom" - __type__ = "account" - __version__ = "0.22" - - __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.logDebug("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.logDebug(page) - xml = dom.parseString(page) - exp_time = time() + int(xml.getElementsByTagName("date")[0].childNodes[0].nodeValue) * 24 * 60 * 60 - account_info = {"validuntil": exp_time, "trafficleft": -1} - return account_info - - def login(self, user, data, req): - urlparams = 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 deleted file mode 100644 index 221d1615d..000000000 --- a/pyload/plugins/accounts/BayfilesCom.py +++ /dev/null @@ -1,36 +0,0 @@ -# -*- coding: utf-8 -*- - -from time import time - -from pyload.plugins.base.Account import Account -from pyload.utils import json_loads - - -class BayfilesCom(Account): - __name__ = "BayfilesCom" - __type__ = "account" - __version__ = "0.03" - - __description__ = """Bayfiles.com account plugin""" - __author_name__ = "zoidberg" - __author_mail__ = "zoidberg@mujmail.cz" - - - def loadAccountInfo(self, user, req): - for _ in xrange(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(user) - - 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() diff --git a/pyload/plugins/accounts/BitshareCom.py b/pyload/plugins/accounts/BitshareCom.py deleted file mode 100644 index ad44424b3..000000000 --- a/pyload/plugins/accounts/BitshareCom.py +++ /dev/null @@ -1,31 +0,0 @@ -# -*- coding: utf-8 -*- - -from pyload.plugins.base.Account import Account - - -class BitshareCom(Account): - __name__ = "BitshareCom" - __type__ = "account" - __version__ = "0.12" - - __description__ = """Bitshare account plugin""" - __author_name__ = "Paul King" - __author_mail__ = None - - - 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 '<input type="checkbox" name="directdownload" checked="checked" />' in page: - self.logWarning(_("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/CramitIn.py b/pyload/plugins/accounts/CramitIn.py deleted file mode 100644 index 5bf7a3141..000000000 --- a/pyload/plugins/accounts/CramitIn.py +++ /dev/null @@ -1,15 +0,0 @@ -# -*- coding: utf-8 -*- - -from pyload.plugins.internal.XFSPAccount import XFSPAccount - - -class CramitIn(XFSPAccount): - __name__ = "CramitIn" - __type__ = "account" - __version__ = "0.01" - - __description__ = """Cramit.in account plugin""" - __author_name__ = "zoidberg" - __author_mail__ = "zoidberg@mujmail.cz" - - MAIN_PAGE = "http://cramit.in/" diff --git a/pyload/plugins/accounts/CyberlockerCh.py b/pyload/plugins/accounts/CyberlockerCh.py deleted file mode 100644 index 94cc0d8c4..000000000 --- a/pyload/plugins/accounts/CyberlockerCh.py +++ /dev/null @@ -1,35 +0,0 @@ -# -*- coding: utf-8 -*- - -from pyload.plugins.internal.XFSPAccount import XFSPAccount -from pyload.plugins.internal.SimpleHoster import parseHtmlForm - - -class CyberlockerCh(XFSPAccount): - __name__ = "CyberlockerCh" - __type__ = "account" - __version__ = "0.01" - - __description__ = """Cyberlocker.ch 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 deleted file mode 100644 index d22def156..000000000 --- a/pyload/plugins/accounts/CzshareCom.py +++ /dev/null @@ -1,41 +0,0 @@ -# -*- coding: utf-8 -*- - -from time import mktime, strptime -import re - -from pyload.plugins.base.Account import Account - - -class CzshareCom(Account): - __name__ = "CzshareCom" - __type__ = "account" - __version__ = "0.14" - - __description__ = """Czshare.com account plugin, now Sdilej.cz""" - __author_name__ = ("zoidberg", "stickell") - __author_mail__ = ("zoidberg@mujmail.cz", "l.stickell@yahoo.it") - - CREDIT_LEFT_PATTERN = r'<tr class="active">\s*<td>([0-9 ,]+) (KiB|MiB|GiB)</td>\s*<td>([^<]*)</td>\s*</tr>' - - - def loadAccountInfo(self, user, req): - html = req.load("http://sdilej.cz/prehled_kreditu/") - - m = re.search(self.CREDIT_LEFT_PATTERN, html) - if m is None: - return {"validuntil": 0, "trafficleft": 0} - else: - credits = float(m.group(1).replace(' ', '').replace(',', '.')) - credits = credits * 1024 ** {'KiB': 0, 'MiB': 1, 'GiB': 2}[m.group(2)] - validuntil = mktime(strptime(m.group(3), '%d.%m.%y %H:%M')) - return {"validuntil": validuntil, "trafficleft": credits} - - def login(self, user, data, req): - html = req.load('https://sdilej.cz/index.php', post={ - "Prihlasit": "Prihlasit", - "login-password": data['password'], - "login-name": user - }) - - if '<div class="login' in html: - self.wrongPassword() diff --git a/pyload/plugins/accounts/DebridItaliaCom.py b/pyload/plugins/accounts/DebridItaliaCom.py deleted file mode 100644 index 79a98599e..000000000 --- a/pyload/plugins/accounts/DebridItaliaCom.py +++ /dev/null @@ -1,36 +0,0 @@ -# -*- coding: utf-8 -*- - -import re -import time - -from pyload.plugins.base.Account import Account - - -class DebridItaliaCom(Account): - __name__ = "DebridItaliaCom" - __type__ = "account" - __version__ = "0.1" - - __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/pyload/plugins/accounts/DepositfilesCom.py b/pyload/plugins/accounts/DepositfilesCom.py deleted file mode 100644 index 9fc0772c4..000000000 --- a/pyload/plugins/accounts/DepositfilesCom.py +++ /dev/null @@ -1,32 +0,0 @@ -# -*- coding: utf-8 -*- - -import re - -from time import strptime, mktime - -from pyload.plugins.base.Account import Account - - -class DepositfilesCom(Account): - __name__ = "DepositfilesCom" - __type__ = "account" - __version__ = "0.3" - - __description__ = """Depositfiles.com account plugin""" - __author_name__ = ("mkaay", "stickell", "Walter Purcaro") - __author_mail__ = ("mkaay@mkaay.de", "l.stickell@yahoo.it", "vuolter@gmail.com") - - - def loadAccountInfo(self, user, req): - src = req.load("https://dfiles.eu/de/gold/") - validuntil = re.search(r"Sie haben Gold Zugang bis: <b>(.*?)</b></div>", src).group(1) - - validuntil = int(mktime(strptime(validuntil, "%Y-%m-%d %H:%M:%S"))) - - return {"validuntil": validuntil, "trafficleft": -1} - - def login(self, user, data, req): - src = req.load("https://dfiles.eu/de/login.php", get={"return": "/de/gold/payment.php"}, - post={"login": user, "password": data['password']}) - if r'<div class="error_message">Sie haben eine falsche Benutzername-Passwort-Kombination verwendet.</div>' in src: - self.wrongPassword() diff --git a/pyload/plugins/accounts/DevhostSt.py b/pyload/plugins/accounts/DevhostSt.py deleted file mode 100644 index 03d7d9964..000000000 --- a/pyload/plugins/accounts/DevhostSt.py +++ /dev/null @@ -1,49 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Test links: -# http://d-h.st/mM8 - -import re - -from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo - - -class DevhostSt(SimpleHoster): - __name__ = "Devhost" - __type__ = "hoster" - __version__ = "0.01" - - __pattern__ = r'http://(?:www\.)?d-h\.st/\w+' - - __description__ = """d-h.st hoster plugin""" - __author_name__ = "zapp-brannigan" - __author_mail__ = "fuerst.reinje@web.de" - - - FILE_NAME_PATTERN = r'>Filename:</span> <div title="(?P<N>.+?)"' - FILE_SIZE_PATTERN = r'>Size:</span> (?P<S>[\d.]+) (?P<U>\w+)' - - OFFLINE_PATTERN = r'>File Not Found<' - LINK_PATTERN = r'id="downloadfile" href="(.+?)"' - - - def setup(self): - self.multiDL = True - self.chunkLimit = 1 - - - def handleFree(self): - m = re.search(self.LINK_PATTERN, self.html) - if m is None: - self.parseError("Download link not found") - - dl_url = m.group(1) - self.logDebug("Download URL = " + dl_url) - self.download(dl_url, disposition=True) - - check = self.checkDownload({'is_html': re.compile("html")}) - if check == "is_html": - self.parseError("Downloaded file is an html file") - - -getInfo = create_getInfo(DevhostSt) diff --git a/pyload/plugins/accounts/DevhostStFolder.py b/pyload/plugins/accounts/DevhostStFolder.py deleted file mode 100644 index 1c9bd3889..000000000 --- a/pyload/plugins/accounts/DevhostStFolder.py +++ /dev/null @@ -1,29 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Test links: -# http://d-h.st/users/shine/?fld_id=37263#files - -import re - -from urlparse import urljoin - -from pyload.plugins.internal.SimpleCrypter import SimpleCrypter - - -class DevhostStFolder(SimpleCrypter): - __name__ = "DevhostStFolder" - __type__ = "crypter" - __version__ = "0.01" - - __pattern__ = r'http://(?:www\.)?d-h\.st/users/\w+/\?fld_id=\d+' - - __description__ = """d-h.st decrypter plugin""" - __author_name_ = "zapp-brannigan" - __author_mail_ = "fuerst.reinje@web.de" - - - LINK_PATTERN = r';"><a href="/(\w+)' - - - def getLinks(self): - return [urljoin("http://d-h.st", link) for link in re.findall(self.LINK_PATTERN, self.html)] diff --git a/pyload/plugins/accounts/DropboxCom.py b/pyload/plugins/accounts/DropboxCom.py deleted file mode 100644 index d3078c7f6..000000000 --- a/pyload/plugins/accounts/DropboxCom.py +++ /dev/null @@ -1,42 +0,0 @@ -# -*- coding: utf-8 -*- - -import re - -from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo - - -class DropboxCom(SimpleHoster): - __name__ = "DropboxCom" - __type__ = "hoster" - __version__ = "0.01" - - __pattern__ = r'https?://(?:www\.)?dropbox\.com/.+' - - __description__ = """Dropbox.com hoster plugin""" - __author_name__ = "zapp-brannigan" - __author_mail__ = "fuerst.reinje@web.de" - - - FILE_NAME_PATTERN = r'<title>Dropbox - (?P<N>.+?)<' - FILE_SIZE_PATTERN = r' ·  (?P<S>[\d,]+) (?P<U>\w+)' - - OFFLINE_PATTERN = r'<title>Dropbox - (404|Shared link error)<' - - SH_COOKIES = [(".dropbox.com", "lang", "en")] - - - def setup(self): - self.multiDL = True - self.chunkLimit = 1 - self.resumeDownload = True - - - def handleFree(self): - self.download(self.pyfile.url, get={'dl': "1"}) - - check = self.checkDownload({'is_html': re.compile("html")}) - if check == "is_html": - self.parseError("Downloaded file is an html file") - - -getInfo = create_getInfo(DropboxCom) diff --git a/pyload/plugins/accounts/EasybytezCom.py b/pyload/plugins/accounts/EasybytezCom.py deleted file mode 100644 index 7634594e4..000000000 --- a/pyload/plugins/accounts/EasybytezCom.py +++ /dev/null @@ -1,69 +0,0 @@ -# -*- coding: utf-8 -*- - -import re -from time import mktime, strptime, gmtime - -from pyload.plugins.base.Account import Account -from pyload.plugins.internal.SimpleHoster import parseHtmlForm -from pyload.utils import parseFileSize - - -class EasybytezCom(Account): - __name__ = "EasybytezCom" - __type__ = "account" - __version__ = "0.06" - - __description__ = """EasyBytez.com account plugin""" - __author_name__ = ("zoidberg", "guidobelix") - __author_mail__ = ("zoidberg@mujmail.cz", "guidobelix@hotmail.it") - - VALID_UNTIL_PATTERN = r'Premium account expire:</TD><TD><b>([^<]+)</b>' - TRAFFIC_LEFT_PATTERN = r'<TR><TD>Traffic available today:</TD><TD><b>(?P<S>[^<]+)</b>' - - - def loadAccountInfo(self, user, req): - html = req.load("http://www.easybytez.com/?op=my_account", decode=True) - - validuntil = None - trafficleft = None - premium = False - - m = re.search(self.VALID_UNTIL_PATTERN, html) - if m: - expiredate = m.group(1) - self.logDebug("Expire date: " + expiredate) - - try: - validuntil = mktime(strptime(expiredate, "%d %B %Y")) - except Exception, e: - self.logError(e) - - if validuntil > mktime(gmtime()): - premium = True - trafficleft = -1 - else: - premium = False - validuntil = -1 - - m = re.search(self.TRAFFIC_LEFT_PATTERN, html) - if m: - trafficleft = m.group(1) - if "Unlimited" in trafficleft: - trafficleft = -1 - 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() diff --git a/pyload/plugins/accounts/EgoFilesCom.py b/pyload/plugins/accounts/EgoFilesCom.py deleted file mode 100644 index 8947d24c7..000000000 --- a/pyload/plugins/accounts/EgoFilesCom.py +++ /dev/null @@ -1,44 +0,0 @@ -# -*- coding: utf-8 -*- - -import re -import time - -from pyload.plugins.base.Account import Account -from pyload.utils import parseFileSize - - -class EgoFilesCom(Account): - __name__ = "EgoFilesCom" - __type__ = "account" - __version__ = "0.2" - - __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/pyload/plugins/accounts/EuroshareEu.py b/pyload/plugins/accounts/EuroshareEu.py deleted file mode 100644 index 7481bceac..000000000 --- a/pyload/plugins/accounts/EuroshareEu.py +++ /dev/null @@ -1,41 +0,0 @@ -# -*- coding: utf-8 -*- - -from time import mktime, strptime -import re - -from pyload.plugins.base.Account import Account - - -class EuroshareEu(Account): - __name__ = "EuroshareEu" - __type__ = "account" - __version__ = "0.01" - - __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/") - - m = re.search('id="input_expire_date" value="(\d+\.\d+\.\d+ \d+:\d+)"', html) - if m is None: - premium, validuntil = False, -1 - else: - premium = True - validuntil = mktime(strptime(m.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() diff --git a/pyload/plugins/accounts/FastixRu.py b/pyload/plugins/accounts/FastixRu.py deleted file mode 100644 index 953ba0c1e..000000000 --- a/pyload/plugins/accounts/FastixRu.py +++ /dev/null @@ -1,36 +0,0 @@ -# -*- coding: utf-8 -*- - -from pyload.plugins.base.Account import Account -from pyload.utils import json_loads - - -class FastixRu(Account): - __name__ = "FastixRu" - __type__ = "account" - __version__ = "0.02" - - __description__ = """Fastix account plugin""" - __author_name__ = "Massimo Rosamilia" - __author_mail__ = "max@spiritix.eu" - - - def loadAccountInfo(self, user, req): - data = self.getAccountData(user) - page = req.load("http://fastix.ru/api_v2/?apikey=%s&sub=getaccountdetails" % (data['api'])) - page = json_loads(page) - points = page['points'] - kb = float(points) - kb = kb * 1024 ** 2 / 1000 - if points > 0: - account_info = {"validuntil": -1, "trafficleft": kb} - else: - account_info = {"validuntil": None, "trafficleft": None, "premium": False} - return account_info - - def login(self, user, data, req): - page = req.load("http://fastix.ru/api_v2/?sub=get_apikey&email=%s&password=%s" % (user, data['password'])) - api = json_loads(page) - api = api['apikey'] - data['api'] = api - if "error_code" in page: - self.wrongPassword() diff --git a/pyload/plugins/accounts/FastshareCz.py b/pyload/plugins/accounts/FastshareCz.py deleted file mode 100644 index 0feca4198..000000000 --- a/pyload/plugins/accounts/FastshareCz.py +++ /dev/null @@ -1,41 +0,0 @@ -# -*- coding: utf-8 -*- - -import re -from pyload.plugins.base.Account import Account -from pyload.utils import parseFileSize - - -class FastshareCz(Account): - __name__ = "FastshareCz" - __type__ = "account" - __version__ = "0.03" - - __description__ = """Fastshare.cz account plugin""" - __author_name__ = ("zoidberg", "stickell") - __author_mail__ = ("zoidberg@mujmail.cz", "l.stickell@yahoo.it") - - CREDIT_PATTERN = r'(?:Kredit|Credit)\s*</td>\s*<td[^>]*>([\d. \w]+) ' - - - def loadAccountInfo(self, user, req): - html = req.load("http://www.fastshare.cz/user", decode=True) - - m = re.search(self.CREDIT_PATTERN, html) - if m: - trafficleft = parseFileSize(m.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() diff --git a/pyload/plugins/accounts/File4safeCom.py b/pyload/plugins/accounts/File4safeCom.py deleted file mode 100644 index 4da721193..000000000 --- a/pyload/plugins/accounts/File4safeCom.py +++ /dev/null @@ -1,18 +0,0 @@ -# -*- coding: utf-8 -*- - -from pyload.plugins.internal.XFSPAccount import XFSPAccount - - -class File4safeCom(XFSPAccount): - __name__ = "File4safeCom" - __type__ = "account" - __version__ = "0.01" - - __description__ = """File4safe.com account plugin""" - __author_name__ = "stickell" - __author_mail__ = "l.stickell@yahoo.it" - - MAIN_PAGE = "http://file4safe.com/" - - LOGIN_FAIL_PATTERN = r'input_login' - PREMIUM_PATTERN = r'Extend Premium' diff --git a/pyload/plugins/accounts/FilecloudIo.py b/pyload/plugins/accounts/FilecloudIo.py deleted file mode 100644 index 504c10be2..000000000 --- a/pyload/plugins/accounts/FilecloudIo.py +++ /dev/null @@ -1,57 +0,0 @@ -# -*- coding: utf-8 -*- - -from pyload.plugins.base.Account import Account -from pyload.utils import json_loads - - -class FilecloudIo(Account): - __name__ = "FilecloudIo" - __type__ = "account" - __version__ = "0.02" - - __description__ = """FilecloudIo account plugin""" - __author_name__ = ("zoidberg", "stickell") - __author_mail__ = ("zoidberg@mujmail.cz", "l.stickell@yahoo.it") - - - def loadAccountInfo(self, user, req): - # It looks like the first API request always fails, so we retry 5 times, it should work on the second try - for _ in xrange(5): - rep = req.load("https://secure.filecloud.io/api-fetch_apikey.api", - post={"username": user, "password": self.accounts[user]['password']}) - rep = json_loads(rep) - if rep['status'] == 'ok': - break - elif rep['status'] == 'error' and rep['message'] == 'no such user or wrong password': - self.logError("Wrong username or password") - return {"valid": False, "premium": False} - else: - return {"premium": False} - - akey = rep['akey'] - self.accounts[user]['akey'] = akey # Saved for hoster plugin - rep = req.load("http://api.filecloud.io/api-fetch_account_details.api", - post={"akey": akey}) - rep = json_loads(rep) - - if rep['is_premium'] == 1: - return {"validuntil": int(rep['premium_until']), "trafficleft": -1} - else: - return {"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 = {} diff --git a/pyload/plugins/accounts/FilefactoryCom.py b/pyload/plugins/accounts/FilefactoryCom.py deleted file mode 100644 index 047e7bb36..000000000 --- a/pyload/plugins/accounts/FilefactoryCom.py +++ /dev/null @@ -1,46 +0,0 @@ -# -*- coding: utf-8 -*- - -import re -from time import mktime, strptime - -from pycurl import REFERER - -from pyload.plugins.base.Account import Account - - -class FilefactoryCom(Account): - __name__ = "FilefactoryCom" - __type__ = "account" - __version__ = "0.14" - - __description__ = """Filefactory.com account plugin""" - __author_name__ = ("zoidberg", "stickell") - __author_mail__ = ("zoidberg@mujmail.cz", "l.stickell@yahoo.it") - - VALID_UNTIL_PATTERN = r'Premium valid until: <strong>(?P<d>\d{1,2})\w{1,2} (?P<m>\w{3}), (?P<y>\d{4})</strong>' - - - def loadAccountInfo(self, user, req): - html = req.load("http://www.filefactory.com/account/") - - m = re.search(self.VALID_UNTIL_PATTERN, html) - if m: - premium = True - validuntil = re.sub(self.VALID_UNTIL_PATTERN, '\g<d> \g<m> \g<y>', m.group(0)) - validuntil = mktime(strptime(validuntil, "%d %b %Y")) - else: - premium = False - validuntil = -1 - - return {"premium": premium, "trafficleft": -1, "validuntil": validuntil} - - def login(self, user, data, req): - req.http.c.setopt(REFERER, "http://www.filefactory.com/member/login.php") - - html = req.load("http://www.filefactory.com/member/signin.php", post={ - "loginEmail": user, - "loginPassword": data['password'], - "Submit": "Sign In"}) - - if req.lastEffectiveURL != "http://www.filefactory.com/account/": - self.wrongPassword() diff --git a/pyload/plugins/accounts/FilejungleCom.py b/pyload/plugins/accounts/FilejungleCom.py deleted file mode 100644 index 596e928ed..000000000 --- a/pyload/plugins/accounts/FilejungleCom.py +++ /dev/null @@ -1,47 +0,0 @@ -# -*- coding: utf-8 -*- - -import re -from time import mktime, strptime - -from pyload.plugins.base.Account import Account - - -class FilejungleCom(Account): - __name__ = "FilejungleCom" - __type__ = "account" - __version__ = "0.11" - - __description__ = """Filejungle.com account plugin""" - __author_name__ = "zoidberg" - __author_mail__ = "zoidberg@mujmail.cz" - - login_timeout = 60 - - URL = "http://filejungle.com/" - TRAFFIC_LEFT_PATTERN = r'"/extend_premium\.php">Until (\d+ [A-Za-z]+ \d+)<br' - LOGIN_FAILED_PATTERN = r'<span htmlfor="loginUser(Name|Password)" generated="true" class="fail_info">' - - - def loadAccountInfo(self, user, req): - html = req.load(self.URL + "dashboard.php") - m = re.search(self.TRAFFIC_LEFT_PATTERN, html) - if m: - premium = True - validuntil = mktime(strptime(m.group(1), "%d %b %Y")) - else: - premium = False - validuntil = -1 - - return {"premium": premium, "trafficleft": -1, "validuntil": validuntil} - - def login(self, user, data, req): - html = req.load(self.URL + "login.php", post={ - "loginUserName": user, - "loginUserPassword": data['password'], - "loginFormSubmit": "Login", - "recaptcha_challenge_field": "", - "recaptcha_response_field": "", - "recaptcha_shortencode_field": ""}) - - if re.search(self.LOGIN_FAILED_PATTERN, html): - self.wrongPassword() diff --git a/pyload/plugins/accounts/FilerNet.py b/pyload/plugins/accounts/FilerNet.py deleted file mode 100644 index 67bab6ba8..000000000 --- a/pyload/plugins/accounts/FilerNet.py +++ /dev/null @@ -1,49 +0,0 @@ -# -*- coding: utf-8 -*- - -import re -import time - -from pyload.plugins.base.Account import Account -from pyload.utils import parseFileSize - - -class FilerNet(Account): - __name__ = "FilerNet" - __type__ = "account" - __version__ = "0.01" - - __description__ = """Filer.net account plugin""" - __author_name__ = "stickell" - __author_mail__ = "l.stickell@yahoo.it" - - TOKEN_PATTERN = r'_csrf_token" value="([^"]+)" />' - WALID_UNTIL_PATTERN = r"Der Premium-Zugang ist gültig bis (.+)\.\s*</td>" - TRAFFIC_PATTERN = r'Traffic</th>\s*<td>([^<]+)</td>' - FREE_PATTERN = r'Account Status</th>\s*<td>\s*Free' - - - def loadAccountInfo(self, user, req): - html = req.load("https://filer.net/profile") - - # Free user - if re.search(self.FREE_PATTERN, html): - return {"premium": False, "validuntil": None, "trafficleft": None} - - until = re.search(self.WALID_UNTIL_PATTERN, html) - traffic = re.search(self.TRAFFIC_PATTERN, html) - if until and traffic: - validuntil = int(time.mktime(time.strptime(until.group(1), "%d.%m.%Y %H:%M:%S"))) - trafficleft = parseFileSize(traffic.group(1)) / 1024 - return {"premium": True, "validuntil": validuntil, "trafficleft": trafficleft} - else: - self.logError("Unable to retrieve account information - Plugin may be out of date") - return {"premium": False, "validuntil": None, "trafficleft": None} - - def login(self, user, data, req): - html = req.load("https://filer.net/login") - token = re.search(self.TOKEN_PATTERN, html).group(1) - html = req.load("https://filer.net/login_check", - post={"_username": user, "_password": data['password'], - "_remember_me": "on", "_csrf_token": token, "_target_path": "https://filer.net/"}) - if 'Logout' not in html: - self.wrongPassword() diff --git a/pyload/plugins/accounts/FilerioCom.py b/pyload/plugins/accounts/FilerioCom.py deleted file mode 100644 index 0a8bc10cd..000000000 --- a/pyload/plugins/accounts/FilerioCom.py +++ /dev/null @@ -1,15 +0,0 @@ -# -*- coding: utf-8 -*- - -from pyload.plugins.internal.XFSPAccount import XFSPAccount - - -class FilerioCom(XFSPAccount): - __name__ = "FilerioCom" - __type__ = "account" - __version__ = "0.01" - - __description__ = """FileRio.in account plugin""" - __author_name__ = "zoidberg" - __author_mail__ = "zoidberg@mujmail.cz" - - MAIN_PAGE = "http://filerio.in/" diff --git a/pyload/plugins/accounts/FilesMailRu.py b/pyload/plugins/accounts/FilesMailRu.py deleted file mode 100644 index b0375f6d2..000000000 --- a/pyload/plugins/accounts/FilesMailRu.py +++ /dev/null @@ -1,27 +0,0 @@ -# -*- coding: utf-8 -*- - -from pyload.plugins.base.Account import Account - - -class FilesMailRu(Account): - __name__ = "FilesMailRu" - __type__ = "account" - __version__ = "0.1" - - __description__ = """Filesmail.ru account plugin""" - __author_name__ = "RaNaN" - __author_mail__ = "RaNaN@pyload.org" - - - def loadAccountInfo(self, user, req): - return {"validuntil": None, "trafficleft": None} - - def login(self, user, data, req): - user, domain = user.split("@") - - page = req.load("http://swa.mail.ru/cgi-bin/auth", None, - {"Domain": domain, "Login": user, "Password": data['password'], - "Page": "http://files.mail.ru/"}, cookies=True) - - if "Неверное имя пользователя или пароль" in page: # @TODO seems not to work - self.wrongPassword() diff --git a/pyload/plugins/accounts/FileserveCom.py b/pyload/plugins/accounts/FileserveCom.py deleted file mode 100644 index ea678f87b..000000000 --- a/pyload/plugins/accounts/FileserveCom.py +++ /dev/null @@ -1,43 +0,0 @@ -# -*- coding: utf-8 -*- - -from time import mktime, strptime - -from pyload.plugins.base.Account import Account -from pyload.utils import json_loads - - -class FileserveCom(Account): - __name__ = "FileserveCom" - __type__ = "account" - __version__ = "0.2" - - __description__ = """Fileserve.com account plugin""" - __author_name__ = "mkaay" - __author_mail__ = "mkaay@mkaay.de" - - - def loadAccountInfo(self, user, req): - data = self.getAccountData(user) - - page = req.load("http://app.fileserve.com/api/login/", post={"username": user, "password": data['password'], - "submit": "Submit+Query"}) - res = json_loads(page) - - if res['type'] == "premium": - validuntil = mktime(strptime(res['expireTime'], "%Y-%m-%d %H:%M:%S")) - return {"trafficleft": res['traffic'], "validuntil": validuntil} - else: - return {"premium": False, "trafficleft": None, "validuntil": None} - - def login(self, user, data, req): - page = req.load("http://app.fileserve.com/api/login/", post={"username": user, "password": data['password'], - "submit": "Submit+Query"}) - res = json_loads(page) - - if not res['type']: - self.wrongPassword() - - #login at fileserv page - req.load("http://www.fileserve.com/login.php", - post={"loginUserName": user, "loginUserPassword": data['password'], "autoLogin": "checked", - "loginFormSubmit": "Login"}) diff --git a/pyload/plugins/accounts/FourSharedCom.py b/pyload/plugins/accounts/FourSharedCom.py deleted file mode 100644 index c973f4d65..000000000 --- a/pyload/plugins/accounts/FourSharedCom.py +++ /dev/null @@ -1,31 +0,0 @@ -# -*- coding: utf-8 -*- - -from pyload.plugins.base.Account import Account -from pyload.utils import json_loads - - -class FourSharedCom(Account): - __name__ = "FourSharedCom" - __type__ = "account" - __version__ = "0.03" - - __description__ = """FourShared.com account plugin""" - __author_name__ = ("zoidberg", "stickell") - __author_mail__ = ("zoidberg@mujmail.cz", "l.stickell@yahoo.it") - - - def loadAccountInfo(self, user, req): - # Free mode only for now - return {"premium": False} - - def login(self, user, data, req): - req.cj.setCookie("4shared.com", "4langcookie", "en") - response = req.load('http://www.4shared.com/web/login', - post={"login": user, - "password": data['password'], - "remember": "on", - "_remember": "on", - "returnTo": "http://www.4shared.com/account/home.jsp"}) - - if 'Please log in to access your 4shared account' in response: - self.wrongPassword() diff --git a/pyload/plugins/accounts/FreakshareCom.py b/pyload/plugins/accounts/FreakshareCom.py deleted file mode 100644 index 9bc68e6b4..000000000 --- a/pyload/plugins/accounts/FreakshareCom.py +++ /dev/null @@ -1,39 +0,0 @@ -# -*- coding: utf-8 -*- - -import re -from time import strptime, mktime - -from pyload.plugins.base.Account import Account - - -class FreakshareCom(Account): - __name__ = "FreakshareCom" - __type__ = "account" - __version__ = "0.1" - - __description__ = """Freakshare.com account plugin""" - __author_name__ = "RaNaN" - __author_mail__ = "RaNaN@pyload.org" - - - def loadAccountInfo(self, user, req): - page = req.load("http://freakshare.com/") - - validuntil = r"ltig bis:</td>\s*<td><b>([0-9 \-:.]+)</b></td>" - validuntil = re.search(validuntil, page, re.MULTILINE) - validuntil = validuntil.group(1).strip() - validuntil = mktime(strptime(validuntil, "%d.%m.%Y - %H:%M")) - - traffic = r"Traffic verbleibend:</td>\s*<td>([^<]+)" - traffic = re.search(traffic, page, re.MULTILINE) - traffic = traffic.group(1).strip() - traffic = self.parseTraffic(traffic) - - return {"validuntil": validuntil, "trafficleft": traffic} - - def login(self, user, data, req): - page = req.load("http://freakshare.com/login.html", None, - {"submit": "Login", "user": user, "pass": data['password']}, cookies=True) - - if "Falsche Logindaten!" in page or "Wrong Username or Password!" in page: - self.wrongPassword() diff --git a/pyload/plugins/accounts/FreeWayMe.py b/pyload/plugins/accounts/FreeWayMe.py deleted file mode 100644 index c40d4486d..000000000 --- a/pyload/plugins/accounts/FreeWayMe.py +++ /dev/null @@ -1,52 +0,0 @@ -# -*- coding: utf-8 -*- - -from pyload.plugins.base.Account import Account -from pyload.utils import json_loads - - -class FreeWayMe(Account): - __name__ = "FreeWayMe" - __type__ = "account" - __version__ = "0.11" - - __description__ = """FreeWayMe account plugin""" - __author_name__ = "Nicolas Giese" - __author_mail__ = "james@free-way.me" - - - def loadAccountInfo(self, user, req): - status = self.getAccountStatus(user, req) - if not status: - return False - self.logDebug(status) - - account_info = {"validuntil": -1, "premium": False} - if status['premium'] == "Free": - account_info['trafficleft'] = int(status['guthaben']) * 1024 - elif status['premium'] == "Spender": - account_info['trafficleft'] = -1 - elif status['premium'] == "Flatrate": - account_info = {"validuntil": int(status['Flatrate']), - "trafficleft": -1, - "premium": True} - - return account_info - - def getpw(self, user): - return self.accounts[user]['password'] - - def login(self, user, data, req): - status = self.getAccountStatus(user, req) - - # Check if user and password are valid - if not status: - self.wrongPassword() - - def getAccountStatus(self, user, req): - answer = req.load("https://www.free-way.me/ajax/jd.php", - get={"id": 4, "user": user, "pass": self.accounts[user]['password']}) - self.logDebug("Login: %s" % answer) - if answer == "Invalid login": - self.wrongPassword() - return False - return json_loads(answer) diff --git a/pyload/plugins/accounts/FshareVn.py b/pyload/plugins/accounts/FshareVn.py deleted file mode 100644 index 6a357f4bc..000000000 --- a/pyload/plugins/accounts/FshareVn.py +++ /dev/null @@ -1,59 +0,0 @@ -# -*- coding: utf-8 -*- - -from time import mktime, strptime -from pycurl import REFERER -import re - -from pyload.plugins.base.Account import Account - - -class FshareVn(Account): - __name__ = "FshareVn" - __type__ = "account" - __version__ = "0.07" - - __description__ = """Fshare.vn account plugin""" - __author_name__ = ("zoidberg", "stickell") - __author_mail__ = ("zoidberg@mujmail.cz", "l.stickell@yahoo.it") - - VALID_UNTIL_PATTERN = ur'<dt>Thời hạn dùng:</dt>\s*<dd>([^<]+)</dd>' - LIFETIME_PATTERN = ur'<dt>Lần đăng nhập trước:</dt>\s*<dd>[^<]+</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): - html = req.load("http://www.fshare.vn/account_info.php", decode=True) - - if re.search(self.LIFETIME_PATTERN, html): - self.logDebug("Lifetime membership detected") - trafficleft = self.getTrafficLeft() - return {"validuntil": -1, "trafficleft": trafficleft, "premium": True} - - m = re.search(self.VALID_UNTIL_PATTERN, html) - if m: - premium = True - validuntil = mktime(strptime(m.group(1), '%I:%M:%S %p %d-%m-%Y')) - trafficleft = self.getTrafficLeft() - 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") - - html = req.load('https://www.fshare.vn/login.php', post={ - "login_password": data['password'], - "login_useremail": user, - "url_refe": "http://www.fshare.vn/index.php" - }, referer=True, decode=True) - - if not re.search(r'<img\s+alt="VIP"', html): - self.wrongPassword() - - def getTrafficLeft(self): - m = re.search(self.TRAFFIC_LEFT_PATTERN, html) - return float(m.group(1)) * 1024 ** {'k': 0, 'K': 0, 'M': 1, 'G': 2}[m.group(2)] if m else 0 diff --git a/pyload/plugins/accounts/Ftp.py b/pyload/plugins/accounts/Ftp.py deleted file mode 100644 index e331e4389..000000000 --- a/pyload/plugins/accounts/Ftp.py +++ /dev/null @@ -1,16 +0,0 @@ -# -*- coding: utf-8 -*- - -from pyload.plugins.base.Account import Account - - -class Ftp(Account): - __name__ = "Ftp" - __type__ = "account" - __version__ = "0.01" - - __description__ = """Ftp dummy account plugin""" - __author_name__ = "zoidberg" - __author_mail__ = "zoidberg@mujmail.cz" - - - login_timeout = info_threshold = -1 #: Unlimited diff --git a/pyload/plugins/accounts/HellshareCz.py b/pyload/plugins/accounts/HellshareCz.py deleted file mode 100644 index 6b5d0a87b..000000000 --- a/pyload/plugins/accounts/HellshareCz.py +++ /dev/null @@ -1,74 +0,0 @@ -# -*- coding: utf-8 -*- - -import re -import time - -from pyload.plugins.base.Account import Account - - -class HellshareCz(Account): - __name__ = "HellshareCz" - __type__ = "account" - __version__ = "0.14" - - __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+|\d\d\.\d\d\.)</th>' - - - def loadAccountInfo(self, user, req): - self.relogin(user) - html = req.load("http://www.hellshare.com/") - - m = re.search(self.CREDIT_LEFT_PATTERN, html) - if m is None: - trafficleft = None - validuntil = None - premium = False - else: - credit = m.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": 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'], - "username": user, - "perm_login": "on" - }) - - if "<p>You input a wrong user name or wrong password</p>" in html: - self.wrongPassword() diff --git a/pyload/plugins/accounts/HotfileCom.py b/pyload/plugins/accounts/HotfileCom.py deleted file mode 100644 index 3dde85b49..000000000 --- a/pyload/plugins/accounts/HotfileCom.py +++ /dev/null @@ -1,74 +0,0 @@ -# -*- coding: utf-8 -*- - -from time import strptime, mktime -import hashlib - -from pyload.plugins.base.Account import Account - - -class HotfileCom(Account): - __name__ = "HotfileCom" - __type__ = "account" - __version__ = "0.2" - - __description__ = """Hotfile.com account plugin""" - __author_name__ = ("mkaay", "JoKoT3") - __author_mail__ = ("mkaay@mkaay.de", "jokot3@gmail.com") - - - def loadAccountInfo(self, user, req): - resp = self.apiCall("getuserinfo", user=user) - if resp.startswith("."): - self.core.debug("HotfileCom API Error: %s" % resp) - raise Exception - info = {} - for p in resp.split("&"): - key, value = p.split("=") - info[key] = value - - if info['is_premium'] == '1': - info['premium_until'] = info['premium_until'].replace("T", " ") - zone = info['premium_until'][19:] - info['premium_until'] = info['premium_until'][:19] - zone = int(zone[:3]) - - validuntil = int(mktime(strptime(info['premium_until'], "%Y-%m-%d %H:%M:%S"))) + (zone * 60 * 60) - tmp = {"validuntil": validuntil, "trafficleft": -1, "premium": True} - - elif info['is_premium'] == '0': - tmp = {"premium": False} - - return tmp - - def apiCall(self, method, post={}, user=None): - if user: - data = self.getAccountData(user) - else: - user, data = self.selectAccount() - - req = self.getAccountRequest(user) - - digest = req.load("http://api.hotfile.com/", post={"action": "getdigest"}) - h = hashlib.md5() - h.update(data['password']) - hp = h.hexdigest() - h = hashlib.md5() - h.update(hp) - h.update(digest) - pwhash = h.hexdigest() - - post.update({"action": method}) - post.update({"username": user, "passwordmd5dig": pwhash, "digest": digest}) - resp = req.load("http://api.hotfile.com/", post=post) - req.close() - return resp - - def login(self, user, data, req): - cj = self.getAccountCookies(user) - cj.setCookie("hotfile.com", "lang", "en") - req.load("http://hotfile.com/", cookies=True) - page = req.load("http://hotfile.com/login.php", post={"returnto": "/", "user": user, "pass": data['password']}, - cookies=True) - - if "Bad username/password" in page: - self.wrongPassword() diff --git a/pyload/plugins/accounts/Http.py b/pyload/plugins/accounts/Http.py deleted file mode 100644 index 647af44fe..000000000 --- a/pyload/plugins/accounts/Http.py +++ /dev/null @@ -1,16 +0,0 @@ -# -*- coding: utf-8 -*- - -from pyload.plugins.base.Account import Account - - -class Http(Account): - __name__ = "Http" - __type__ = "account" - __version__ = "0.01" - - __description__ = """Http dummy account plugin""" - __author_name__ = "zoidberg" - __author_mail__ = "zoidberg@mujmail.cz" - - - login_timeout = info_threshold = -1 #: Unlimited diff --git a/pyload/plugins/accounts/KingfilesNet.py b/pyload/plugins/accounts/KingfilesNet.py deleted file mode 100644 index 44c01f770..000000000 --- a/pyload/plugins/accounts/KingfilesNet.py +++ /dev/null @@ -1,86 +0,0 @@ -# -*- coding: utf-8 -*- - -import re - -from pyload.plugins.internal.CaptchaService import SolveMedia -from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo - - -class KingfilesNet(SimpleHoster): - __name__ = "KingfilesNet" - __type__ = "hoster" - __version__ = "0.01" - - __pattern__ = r'http://(?:www\.)?kingfiles\.net/(?P<ID>\w{12})' - - __description__ = """Kingfiles.net hoster plugin""" - __author_name__ = ("zapp-brannigan", "Walter Purcaro") - __author_mail__ = ("fuerst.reinje@web.de", "vuolter@gmail.com") - - - FILE_NAME_PATTERN = r'name="fname" value="(?P<N>.+?)">' - FILE_SIZE_PATTERN = r'>Size: .+?">(?P<S>[\d.]+) (?P<U>\w+)' - - OFFLINE_PATTERN = r'>(File Not Found</b><br><br>|File Not Found</h2>)' - - RAND_ID_PATTERN = r'type=\"hidden\" name=\"rand\" value=\"(.+)\">' - - LINK_PATTERN = r'var download_url = \'(.+)\';' - - - def setup(self): - self.multiDL = True - self.resumeDownload = True - - - def handleFree(self): - # Click the free user button - post_data = {'op': "download1", - 'usr_login': "", - 'id': file_info['ID'], - 'fname': self.pyfile.name, - 'referer': "", - 'method_free': "+"} - b = self.load(self.pyfile.url, post=post_data, cookies=True, decode=True) - - solvemedia = SolveMedia(self) - - captcha_key = solvemedia.detect_key() - if captcha_key is None: - self.parseError("SolveMedia key not found") - - self.logDebug("captcha_key", captcha_key) - captcha_challenge, captcha_response = solvemedia.challenge(captcha_key) - - # Make the downloadlink appear and load the file - m = re.search(self.RAND_ID_PATTERN, b) - if m is None: - self.parseError("Random key not found") - - rand = m.group(1) - self.logDebug("rand", rand) - - post_data = {'op': "download2", - 'id': file_id, - 'rand': rand, - 'referer': self.pyfile.url, - 'method_free': "+", - 'method_premium': "", - 'adcopy_response': captcha_response, - 'adcopy_challenge': captcha_challenge, - 'down_direct': "1"} - c = self.load(self.pyfile.url, post=post_data, cookies=True, decode=True) - - m = re.search(self.LINK_PATTERN, c) - if m is None: - self.parseError("Download url not found") - - dl_url = m.group(1) - self.download(dl_url, cookies=True, disposition=True) - - check = self.checkDownload({'is_html': re.compile("<html>")}) - if check == "is_html": - self.parseError("Downloaded file is an html file") - - -getInfo = create_getInfo(KingfilesNet) diff --git a/pyload/plugins/accounts/LetitbitNet.py b/pyload/plugins/accounts/LetitbitNet.py deleted file mode 100644 index 7c43fff94..000000000 --- a/pyload/plugins/accounts/LetitbitNet.py +++ /dev/null @@ -1,33 +0,0 @@ -# -*- coding: utf-8 -*- - -from pyload.plugins.base.Account import Account -# from pyload.utils import json_loads, json_dumps - - -class LetitbitNet(Account): - __name__ = "LetitbitNet" - __type__ = "account" - __version__ = "0.01" - - __description__ = """Letitbit.net account plugin""" - __author_name__ = "stickell" - __author_mail__ = "l.stickell@yahoo.it" - - - def loadAccountInfo(self, user, req): - ## DISABLED BECAUSE IT GET 'key exausted' EVEN IF VALID ## - # api_key = self.accounts[user]['password'] - # json_data = [api_key, ['key/info']] - # api_rep = req.load('http://api.letitbit.net/json', post={'r': json_dumps(json_data)}) - # self.logDebug("API Key Info: " + api_rep) - # api_rep = json_loads(api_rep) - # - # if api_rep['status'] == 'FAIL': - # self.logWarning(api_rep['data']) - # return {'valid': False, 'premium': False} - - return {"premium": True} - - def login(self, user, data, req): - # API_KEY is the username and the PREMIUM_KEY is the password - self.logInfo("You must use your API KEY as username and the PREMIUM KEY as password.") diff --git a/pyload/plugins/accounts/LinksnappyCom.py b/pyload/plugins/accounts/LinksnappyCom.py deleted file mode 100644 index 9dc1a8b36..000000000 --- a/pyload/plugins/accounts/LinksnappyCom.py +++ /dev/null @@ -1,49 +0,0 @@ -# -*- coding: utf-8 -*- - -from hashlib import md5 - -from pyload.plugins.base.Account import Account -from pyload.utils import json_loads - - -class LinksnappyCom(Account): - __name__ = "LinksnappyCom" - __type__ = "account" - __version__ = "0.02" - - __description__ = """Linksnappy.com account plugin""" - __author_name__ = "stickell" - __author_mail__ = "l.stickell@yahoo.it" - - - def loadAccountInfo(self, user, req): - data = self.getAccountData(user) - r = req.load('http://gen.linksnappy.com/lseAPI.php', - get={'act': 'USERDETAILS', 'username': user, 'password': md5(data['password']).hexdigest()}) - self.logDebug("JSON data: " + r) - j = json_loads(r) - - if j['error']: - return {"premium": False} - - validuntil = j['return']['expire'] - if validuntil == 'lifetime': - validuntil = -1 - elif validuntil == 'expired': - return {"premium": False} - else: - validuntil = float(validuntil) - - if 'trafficleft' not in j['return'] or isinstance(j['return']['trafficleft'], str): - trafficleft = -1 - else: - trafficleft = int(j['return']['trafficleft']) * 1024 - - return {"premium": True, "validuntil": validuntil, "trafficleft": trafficleft} - - def login(self, user, data, req): - r = req.load('http://gen.linksnappy.com/lseAPI.php', - get={'act': 'USERDETAILS', 'username': user, 'password': md5(data['password']).hexdigest()}) - - if 'Invalid Account Details' in r: - self.wrongPassword() diff --git a/pyload/plugins/accounts/MegaDebridEu.py b/pyload/plugins/accounts/MegaDebridEu.py deleted file mode 100644 index 5c58505f3..000000000 --- a/pyload/plugins/accounts/MegaDebridEu.py +++ /dev/null @@ -1,37 +0,0 @@ -# -*- coding: utf-8 -*- - -from pyload.plugins.base.Account import Account -from pyload.utils import json_loads - - -class MegaDebridEu(Account): - __name__ = "MegaDebridEu" - __type__ = "account" - __version__ = "0.2" - - __description__ = """mega-debrid.eu account plugin""" - __author_name__ = "D.Ducatel" - __author_mail__ = "dducatel@je-geek.fr" - - # Define the base URL of MegaDebrid api - API_URL = "https://www.mega-debrid.eu/api.php" - - - def loadAccountInfo(self, user, req): - data = self.getAccountData(user) - jsonResponse = req.load(self.API_URL, - get={'action': 'connectUser', 'login': user, 'password': data['password']}) - response = json_loads(jsonResponse) - - if response['response_code'] == "ok": - return {"premium": True, "validuntil": float(response['vip_end']), "status": True} - else: - self.logError(response) - return {"status": False, "premium": False} - - def login(self, user, data, req): - jsonResponse = req.load(self.API_URL, - get={'action': 'connectUser', 'login': user, 'password': data['password']}) - response = json_loads(jsonResponse) - if response['response_code'] != "ok": - self.wrongPassword() diff --git a/pyload/plugins/accounts/MegasharesCom.py b/pyload/plugins/accounts/MegasharesCom.py deleted file mode 100644 index da0dd7ae7..000000000 --- a/pyload/plugins/accounts/MegasharesCom.py +++ /dev/null @@ -1,46 +0,0 @@ -# -*- coding: utf-8 -*- - -import re -from time import mktime, strptime - -from pyload.plugins.base.Account import Account - - -class MegasharesCom(Account): - __name__ = "MegasharesCom" - __type__ = "account" - __version__ = "0.02" - - __description__ = """Megashares.com account plugin""" - __author_name__ = "zoidberg" - __author_mail__ = "zoidberg@mujmail.cz" - - VALID_UNTIL_PATTERN = r'<p class="premium_info_box">Period Ends: (\w{3} \d{1,2}, \d{4})</p>' - - - def loadAccountInfo(self, user, req): - #self.relogin(user) - html = req.load("http://d01.megashares.com/myms.php", decode=True) - - premium = False if '>Premium Upgrade<' in html else True - - validuntil = trafficleft = -1 - try: - timestr = re.search(self.VALID_UNTIL_PATTERN, html).group(1) - self.logDebug(timestr) - validuntil = mktime(strptime(timestr, "%b %d, %Y")) - except Exception, e: - self.logError(e) - - return {"validuntil": validuntil, "trafficleft": -1, "premium": premium} - - def login(self, user, data, req): - html = req.load('http://d01.megashares.com/myms_login.php', post={ - "httpref": "", - "myms_login": "Login", - "mymslogin_name": user, - "mymspassword": data['password'] - }, decode=True) - - if not '<span class="b ml">%s</span>' % user in html: - self.wrongPassword() diff --git a/pyload/plugins/accounts/MovReelCom.py b/pyload/plugins/accounts/MovReelCom.py deleted file mode 100644 index 0f80b1aa8..000000000 --- a/pyload/plugins/accounts/MovReelCom.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- - -from pyload.plugins.internal.XFSPAccount import XFSPAccount - - -class MovReelCom(XFSPAccount): - __name__ = "MovReelCom" - __type__ = "account" - __version__ = "0.01" - - __description__ = """Movreel.com account plugin""" - __author_name__ = "t4skforce" - __author_mail__ = "t4skforce1337[AT]gmail[DOT]com" - - login_timeout = 60 - info_threshold = 30 - - MAIN_PAGE = "http://movreel.com/" - - TRAFFIC_LEFT_PATTERN = r'Traffic.*?<b>([^<]+)</b>' - LOGIN_FAIL_PATTERN = r'<b[^>]*>Incorrect Login or Password</b><br>' diff --git a/pyload/plugins/accounts/MultishareCz.py b/pyload/plugins/accounts/MultishareCz.py deleted file mode 100644 index fb6677a51..000000000 --- a/pyload/plugins/accounts/MultishareCz.py +++ /dev/null @@ -1,44 +0,0 @@ -# -*- coding: utf-8 -*- - -from pyload.plugins.base.Account import Account -#from time import mktime, strptime -#from pycurl import REFERER -import re -from pyload.utils import parseFileSize - - -class MultishareCz(Account): - __name__ = "MultishareCz" - __type__ = "account" - __version__ = "0.02" - - __description__ = """Multishare.cz account plugin""" - __author_name__ = "zoidberg" - __author_mail__ = "zoidberg@mujmail.cz" - - TRAFFIC_LEFT_PATTERN = r'<span class="profil-zvyrazneni">Kredit:</span>\s*<strong>(?P<S>[0-9,]+) (?P<U>\w+)</strong>' - ACCOUNT_INFO_PATTERN = r'<input type="hidden" id="(u_ID|u_hash)" name="[^"]*" value="([^"]+)">' - - - def loadAccountInfo(self, user, req): - #self.relogin(user) - html = req.load("http://www.multishare.cz/profil/", decode=True) - - m = re.search(self.TRAFFIC_LEFT_PATTERN, html) - trafficleft = parseFileSize(m.group('S'), m.group('U')) / 1024 if m else 0 - self.premium = True if trafficleft else False - - html = req.load("http://www.multishare.cz/", decode=True) - mms_info = dict(re.findall(self.ACCOUNT_INFO_PATTERN, html)) - - return dict(mms_info, **{"validuntil": -1, "trafficleft": trafficleft}) - - def login(self, user, data, req): - html = req.load('http://www.multishare.cz/html/prihlaseni_process.php', post={ - "akce": "Přihlásit", - "heslo": data['password'], - "jmeno": user - }, decode=True) - - if '<div class="akce-chyba akce">' in html: - self.wrongPassword() diff --git a/pyload/plugins/accounts/MyfastfileCom.py b/pyload/plugins/accounts/MyfastfileCom.py deleted file mode 100644 index 6c90793d0..000000000 --- a/pyload/plugins/accounts/MyfastfileCom.py +++ /dev/null @@ -1,34 +0,0 @@ -# -*- coding: utf-8 -*- - -from time import time - -from pyload.plugins.base.Account import Account -from pyload.utils import json_loads - - -class MyfastfileCom(Account): - __name__ = "MyfastfileCom" - __type__ = "account" - __version__ = "0.02" - - __description__ = """Myfastfile.com account plugin""" - __author_name__ = "stickell" - __author_mail__ = "l.stickell@yahoo.it" - - - def loadAccountInfo(self, user, req): - if 'days_left' in self.json_data: - validuntil = int(time() + self.json_data['days_left'] * 24 * 60 * 60) - return {"premium": True, "validuntil": validuntil, "trafficleft": -1} - else: - self.logError("Unable to get account information") - - def login(self, user, data, req): - # Password to use is the API-Password written in http://myfastfile.com/myaccount - html = req.load("http://myfastfile.com/api.php", - get={"user": user, "pass": data['password']}) - self.logDebug("JSON data: " + html) - self.json_data = json_loads(html) - if self.json_data['status'] != 'ok': - self.logError('Invalid login. The password to use is the API-Password you find in your "My Account" page') - self.wrongPassword() diff --git a/pyload/plugins/accounts/NetloadIn.py b/pyload/plugins/accounts/NetloadIn.py deleted file mode 100644 index 01b09c5d8..000000000 --- a/pyload/plugins/accounts/NetloadIn.py +++ /dev/null @@ -1,38 +0,0 @@ -# -*- coding: utf-8 -*- - -import re -from time import time - -from pyload.plugins.base.Account import Account - - -class NetloadIn(Account): - __name__ = "NetloadIn" - __type__ = "account" - __version__ = "0.22" - - __description__ = """Netload.in account plugin""" - __author_name__ = ("RaNaN", "CryNickSystems") - __author_mail__ = ("RaNaN@pyload.org", "webmaster@pcProfil.de") - - - def loadAccountInfo(self, user, req): - page = req.load("http://netload.in/index.php?id=2&lang=de") - left = r">(\d+) (Tag|Tage), (\d+) Stunden<" - left = re.search(left, page) - if left: - validuntil = time() + int(left.group(1)) * 24 * 60 * 60 + int(left.group(3)) * 60 * 60 - trafficleft = -1 - premium = True - else: - validuntil = None - premium = False - trafficleft = None - return {"validuntil": validuntil, "trafficleft": trafficleft, "premium": premium} - - def login(self, user, data, req): - page = req.load("http://netload.in/index.php", None, - {"txtuser": user, "txtpass": data['password'], "txtcheck": "login", "txtlogin": "Login"}, - cookies=True) - if "password or it might be invalid!" in page: - self.wrongPassword() diff --git a/pyload/plugins/accounts/OboomCom.py b/pyload/plugins/accounts/OboomCom.py deleted file mode 100644 index 14bdd1510..000000000 --- a/pyload/plugins/accounts/OboomCom.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- - -import time - -from beaker.crypto.pbkdf2 import PBKDF2 - -from pyload.utils import json_loads -from pyload.plugins.base.Account import Account - - -class OboomCom(Account): - __name__ = "OboomCom" - __type__ = "account" - __version__ = "0.1" - - __description__ = """Oboom.com account plugin""" - __author_name__ = "stanley" - __author_mail__ = "stanley.foerster@gmail.com" - - - def loadAccountData(self, user, req): - passwd = self.getAccountData(user)['password'] - salt = passwd[::-1] - pbkdf2 = PBKDF2(passwd, salt, 1000).hexread(16) - result = json_loads(req.load("https://www.oboom.com/1.0/login", get={"auth": user, "pass": pbkdf2})) - if not result[0] == 200: - self.logWarning("Failed to log in: %s" % result[1]) - self.wrongPassword() - return result[1] - - def loadAccountInfo(self, name, req): - accountData = self.loadAccountData(name, req) - userData = accountData['user'] - - if "premium_unix" in userData: - validUntilUtc = int(userData['premium_unix']) - if validUntilUtc > int(time.time()): - premium = True - validUntil = validUntilUtc - traffic = userData['traffic'] - trafficLeft = traffic['current'] - maxTraffic = traffic['max'] - session = accountData['session'] - return {"premium": premium, - "validuntil": validUntil, - "trafficleft": trafficLeft / 1024, - "maxtraffic": maxTraffic / 1024, - "session": session - } - return {"premium": False, "validuntil": -1} - - def login(self, user, data, req): - self.loadAccountData(user, req) diff --git a/pyload/plugins/accounts/OneFichierCom.py b/pyload/plugins/accounts/OneFichierCom.py deleted file mode 100644 index efb563a60..000000000 --- a/pyload/plugins/accounts/OneFichierCom.py +++ /dev/null @@ -1,48 +0,0 @@ -# -*- coding: utf-8 -*- - -import re -from time import strptime, mktime -from pycurl import REFERER - -from pyload.plugins.base.Account import Account - - -class OneFichierCom(Account): - __name__ = "OneFichierCom" - __type__ = "account" - __version__ = "0.1" - - __description__ = """1fichier.com account plugin""" - __author_name__ = "Elrick69" - __author_mail__ = "elrick69[AT]rocketmail[DOT]com" - - VALID_UNTIL_PATTERN = r'You are a premium user until (?P<d>\d{2})/(?P<m>\d{2})/(?P<y>\d{4})' - - - def loadAccountInfo(self, user, req): - - html = req.load("http://1fichier.com/console/abo.pl") - - m = re.search(self.VALID_UNTIL_PATTERN, html) - - if m: - premium = True - validuntil = re.sub(self.VALID_UNTIL_PATTERN, '\g<d>/\g<m>/\g<y>', m.group(0)) - validuntil = int(mktime(strptime(validuntil, "%d/%m/%Y"))) - else: - premium = False - validuntil = -1 - - return {"premium": premium, "trafficleft": -1, "validuntil": validuntil} - - def login(self, user, data, req): - - req.http.c.setopt(REFERER, "http://1fichier.com/login.pl?lg=en") - - html = req.load("http://1fichier.com/login.pl?lg=en", post={ - "mail": user, - "pass": data['password'], - "Login": "Login"}) - - if r'<div class="error_message">Invalid username or password.</div>' in html: - self.wrongPassword() diff --git a/pyload/plugins/accounts/OverLoadMe.py b/pyload/plugins/accounts/OverLoadMe.py deleted file mode 100644 index 4fe59706c..000000000 --- a/pyload/plugins/accounts/OverLoadMe.py +++ /dev/null @@ -1,35 +0,0 @@ -# -*- coding: utf-8 -*- - -from pyload.plugins.base.Account import Account -from pyload.utils import json_loads - - -class OverLoadMe(Account): - __name__ = "OverLoadMe" - __type__ = "account" - __version__ = "0.01" - - __description__ = """Over-Load.me account plugin""" - __author_name__ = "marley" - __author_mail__ = "marley@over-load.me" - - - def loadAccountInfo(self, user, req): - data = self.getAccountData(user) - page = req.load("https://api.over-load.me/account.php", get={"user": user, "auth": data['password']}).strip() - data = json_loads(page) - - # Check for premium - if data['membership'] == "Free": - return {"premium": False} - - account_info = {"validuntil": data['expirationunix'], "trafficleft": -1} - return account_info - - def login(self, user, data, req): - jsondata = req.load("https://api.over-load.me/account.php", - get={"user": user, "auth": data['password']}).strip() - data = json_loads(jsondata) - - if data['err'] == 1: - self.wrongPassword() diff --git a/pyload/plugins/accounts/PremiumTo.py b/pyload/plugins/accounts/PremiumTo.py deleted file mode 100644 index 75c950263..000000000 --- a/pyload/plugins/accounts/PremiumTo.py +++ /dev/null @@ -1,30 +0,0 @@ -# -*- coding: utf-8 -*- - -from pyload.plugins.base.Account import Account - - -class PremiumTo(Account): - __name__ = "PremiumTo" - __type__ = "account" - __version__ = "0.04" - - __description__ = """Premium.to account plugin""" - __author_name__ = ("RaNaN", "zoidberg", "stickell") - __author_mail__ = ("RaNaN@pyload.org", "zoidberg@mujmail.cz", "l.stickell@yahoo.it") - - - def loadAccountInfo(self, user, req): - api_r = req.load("http://premium.to/api/straffic.php", - get={'username': self.username, 'password': self.password}) - traffic = sum(map(int, api_r.split(';'))) - - return {"trafficleft": int(traffic) / 1024, "validuntil": -1} - - def login(self, user, data, req): - self.username = user - self.password = data['password'] - authcode = req.load("http://premium.to/api/getauthcode.php?username=%s&password=%s" % ( - user, self.password)).strip() - - if "wrong username" in authcode: - self.wrongPassword() diff --git a/pyload/plugins/accounts/PremiumizeMe.py b/pyload/plugins/accounts/PremiumizeMe.py deleted file mode 100644 index 1beb950ae..000000000 --- a/pyload/plugins/accounts/PremiumizeMe.py +++ /dev/null @@ -1,46 +0,0 @@ -# -*- coding: utf-8 -*- - -from pyload.plugins.base.Account import Account - -from pyload.utils import json_loads - - -class PremiumizeMe(Account): - __name__ = "PremiumizeMe" - __type__ = "account" - __version__ = "0.11" - - __description__ = """Premiumize.me account plugin""" - __author_name__ = "Florian Franzen" - __author_mail__ = "FlorianFranzen@gmail.com" - - - def loadAccountInfo(self, user, req): - # 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": max(0, status['result']['trafficleft_bytes'] / 1024)} - - if status['result']['type'] == 'free': - account_info['premium'] = False - - return account_info - - def login(self, user, data, req): - # Get user data from premiumize.me - status = self.getAccountStatus(user, req) - - # Check if user and password are valid - if status['status'] != 200: - self.wrongPassword() - - def getAccountStatus(self, user, req): - # 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¶ms[login]=%s¶ms[pass]=%s" % ( - user, self.accounts[user]['password'])) - return json_loads(answer) diff --git a/pyload/plugins/accounts/QuickshareCz.py b/pyload/plugins/accounts/QuickshareCz.py deleted file mode 100644 index 0d677eecb..000000000 --- a/pyload/plugins/accounts/QuickshareCz.py +++ /dev/null @@ -1,39 +0,0 @@ -# -*- coding: utf-8 -*- - -import re -from pyload.plugins.base.Account import Account -from pyload.utils import parseFileSize - - -class QuickshareCz(Account): - __name__ = "QuickshareCz" - __type__ = "account" - __version__ = "0.01" - - __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) - - m = re.search(r'Stav kreditu: <strong>(.+?)</strong>', html) - if m: - trafficleft = parseFileSize(m.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() diff --git a/pyload/plugins/accounts/RPNetBiz.py b/pyload/plugins/accounts/RPNetBiz.py deleted file mode 100644 index c10122053..000000000 --- a/pyload/plugins/accounts/RPNetBiz.py +++ /dev/null @@ -1,49 +0,0 @@ -# -*- coding: utf-8 -*- - -from pyload.plugins.base.Account import Account -from pyload.utils import json_loads - - -class RPNetBiz(Account): - __name__ = "RPNetBiz" - __type__ = "account" - __version__ = "0.1" - - __description__ = """RPNet.biz account plugin""" - __author_name__ = "Dman" - __author_mail__ = "dmanugm@gmail.com" - - - def loadAccountInfo(self, user, req): - # Get account information from rpnet.biz - response = self.getAccountStatus(user, req) - try: - if response['accountInfo']['isPremium']: - # Parse account info. Change the trafficleft later to support per host info. - account_info = {"validuntil": int(response['accountInfo']['premiumExpiry']), - "trafficleft": -1, "premium": True} - else: - account_info = {"validuntil": None, "trafficleft": None, "premium": False} - - except KeyError: - #handle wrong password exception - account_info = {"validuntil": None, "trafficleft": None, "premium": False} - - return account_info - - def login(self, user, data, req): - # Get account information from rpnet.biz - response = self.getAccountStatus(user, req) - - # If we have an error in the response, we have wrong login information - if 'error' in response: - self.wrongPassword() - - def getAccountStatus(self, user, req): - # Using the rpnet API, check if valid premium account - response = req.load("https://premium.rpnet.biz/client_api.php", - get={"username": user, "password": self.accounts[user]['password'], - "action": "showAccountInformation"}) - self.logDebug("JSON data: %s" % response) - - return json_loads(response) diff --git a/pyload/plugins/accounts/RapidgatorNet.py b/pyload/plugins/accounts/RapidgatorNet.py deleted file mode 100644 index 2c2fd493e..000000000 --- a/pyload/plugins/accounts/RapidgatorNet.py +++ /dev/null @@ -1,56 +0,0 @@ -# -*- coding: utf-8 -*- - -from pyload.plugins.base.Account import Account -from pyload.utils import json_loads - - -class RapidgatorNet(Account): - __name__ = "RapidgatorNet" - __type__ = "account" - __version__ = "0.04" - - __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": int(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() diff --git a/pyload/plugins/accounts/RapidshareCom.py b/pyload/plugins/accounts/RapidshareCom.py deleted file mode 100644 index 9f1670cb8..000000000 --- a/pyload/plugins/accounts/RapidshareCom.py +++ /dev/null @@ -1,54 +0,0 @@ -# -*- coding: utf-8 -*- - -from pyload.plugins.base.Account import Account - - -class RapidshareCom(Account): - __name__ = "RapidshareCom" - __type__ = "account" - __version__ = "0.22" - - __description__ = """Rapidshare.com account plugin""" - __author_name__ = "mkaay" - __author_mail__ = "mkaay@mkaay.de" - - - def loadAccountInfo(self, user, req): - data = self.getAccountData(user) - api_url_base = "http://api.rapidshare.com/cgi-bin/rsapi.cgi" - api_param_prem = {"sub": "getaccountdetails", "type": "prem", "login": user, - "password": data['password'], "withcookie": 1} - src = req.load(api_url_base, cookies=False, get=api_param_prem) - if src.startswith("ERROR"): - raise Exception(src) - fields = src.split("\n") - info = {} - for t in fields: - if not t.strip(): - continue - k, v = t.split("=") - info[k] = v - - validuntil = int(info['billeduntil']) - premium = True if validuntil else False - - tmp = {"premium": premium, "validuntil": validuntil, "trafficleft": -1, "maxtraffic": -1} - - return tmp - - def login(self, user, data, req): - api_url_base = "http://api.rapidshare.com/cgi-bin/rsapi.cgi" - api_param_prem = {"sub": "getaccountdetails", "type": "prem", "login": user, - "password": data['password'], "withcookie": 1} - src = req.load(api_url_base, cookies=False, get=api_param_prem) - if src.startswith("ERROR"): - raise Exception(src + "### Note you have to use your account number for login, instead of name.") - fields = src.split("\n") - info = {} - for t in fields: - if not t.strip(): - continue - k, v = t.split("=") - info[k] = v - cj = self.getAccountCookies(user) - cj.setCookie("rapidshare.com", "enc", info['cookie']) diff --git a/pyload/plugins/accounts/RarefileNet.py b/pyload/plugins/accounts/RarefileNet.py deleted file mode 100644 index 68e2595e2..000000000 --- a/pyload/plugins/accounts/RarefileNet.py +++ /dev/null @@ -1,15 +0,0 @@ -# -*- coding: utf-8 -*- - -from pyload.plugins.internal.XFSPAccount import XFSPAccount - - -class RarefileNet(XFSPAccount): - __name__ = "RarefileNet" - __type__ = "account" - __version__ = "0.02" - - __description__ = """RareFile.net account plugin""" - __author_name__ = "zoidberg" - __author_mail__ = "zoidberg@mujmail.cz" - - MAIN_PAGE = "http://rarefile.net/" diff --git a/pyload/plugins/accounts/RealdebridCom.py b/pyload/plugins/accounts/RealdebridCom.py deleted file mode 100644 index 737f22acf..000000000 --- a/pyload/plugins/accounts/RealdebridCom.py +++ /dev/null @@ -1,35 +0,0 @@ -# -*- coding: utf-8 -*- - -import xml.dom.minidom as dom - -from pyload.plugins.base.Account import Account - - -class RealdebridCom(Account): - __name__ = "RealdebridCom" - __type__ = "account" - __version__ = "0.43" - - __description__ = """Real-Debrid.com account plugin""" - __author_name__ = "Devirex Hazzard" - __author_mail__ = "naibaf_11@yahoo.de" - - - def loadAccountInfo(self, user, req): - if self.pin_code: - return {"premium": False} - page = req.load("https://real-debrid.com/api/account.php") - xml = dom.parseString(page) - account_info = {"validuntil": int(xml.getElementsByTagName("expiration")[0].childNodes[0].nodeValue), - "trafficleft": -1} - - return account_info - - def login(self, user, data, req): - self.pin_code = False - page = req.load("https://real-debrid.com/ajax/login.php", get={"user": user, "pass": data['password']}) - if "Your login informations are incorrect" in page: - self.wrongPassword() - elif "PIN Code required" in page: - self.logWarning("PIN code required. Please login to https://real-debrid.com using the PIN or disable the double authentication in your control panel on https://real-debrid.com.") - self.pin_code = True diff --git a/pyload/plugins/accounts/RehostTo.py b/pyload/plugins/accounts/RehostTo.py deleted file mode 100644 index 0414ad581..000000000 --- a/pyload/plugins/accounts/RehostTo.py +++ /dev/null @@ -1,37 +0,0 @@ -# -*- coding: utf-8 -*- - -from pyload.plugins.base.Account import Account - - -class RehostTo(Account): - __name__ = "RehostTo" - __type__ = "account" - __version__ = "0.1" - - __description__ = """Rehost.to account plugin""" - __author_name__ = "RaNaN" - __author_mail__ = "RaNaN@pyload.org" - - - def loadAccountInfo(self, user, req): - data = self.getAccountData(user) - page = req.load("http://rehost.to/api.php?cmd=login&user=%s&pass=%s" % (user, data['password'])) - data = [x.split("=") for x in page.split(",")] - ses = data[0][1] - long_ses = data[1][1] - - page = req.load("http://rehost.to/api.php?cmd=get_premium_credits&long_ses=%s" % long_ses) - traffic, valid = page.split(",") - - account_info = {"trafficleft": int(traffic) * 1024, - "validuntil": int(valid), - "long_ses": long_ses, - "ses": ses} - - return account_info - - def login(self, user, data, req): - page = req.load("http://rehost.to/api.php?cmd=login&user=%s&pass=%s" % (user, data['password'])) - - if "Login failed." in page: - self.wrongPassword() diff --git a/pyload/plugins/accounts/RyushareCom.py b/pyload/plugins/accounts/RyushareCom.py deleted file mode 100644 index 74258e984..000000000 --- a/pyload/plugins/accounts/RyushareCom.py +++ /dev/null @@ -1,23 +0,0 @@ -# -*- coding: utf-8 -*- - -from pyload.plugins.internal.XFSPAccount import XFSPAccount - - -class RyushareCom(XFSPAccount): - __name__ = "RyushareCom" - __type__ = "account" - __version__ = "0.03" - - __description__ = """Ryushare.com account plugin""" - __author_name__ = ("zoidberg", "trance4us") - __author_mail__ = ("zoidberg@mujmail.cz", "") - - MAIN_PAGE = "http://ryushare.com/" - - - def login(self, user, data, req): - req.lastURL = "http://ryushare.com/login.python" - html = req.load("http://ryushare.com/login.python", - post={"login": user, "password": data['password'], "op": "login"}) - if 'Incorrect Login or Password' in html or '>Error<' in html: - self.wrongPassword() diff --git a/pyload/plugins/accounts/ShareRapidCom.py b/pyload/plugins/accounts/ShareRapidCom.py deleted file mode 100644 index 2cd955bbe..000000000 --- a/pyload/plugins/accounts/ShareRapidCom.py +++ /dev/null @@ -1,52 +0,0 @@ -# -*- coding: utf-8 -*- - -import re - -from time import mktime, strptime -from pyload.plugins.base.Account import Account - - -class ShareRapidCom(Account): - __name__ = "ShareRapidCom" - __type__ = "account" - __version__ = "0.34" - - __description__ = """MegaRapid.cz account plugin""" - __author_name__ = ("MikyWoW", "zoidberg") - __author_mail__ = ("mikywow@seznam.cz", "zoidberg@mujmail.cz") - - login_timeout = 60 - - - def loadAccountInfo(self, user, req): - src = req.load("http://megarapid.cz/mujucet/", decode=True) - - m = re.search(ur'<td>Max. počet paralelních stahování: </td><td>(\d+)', src) - if m: - data = self.getAccountData(user) - data['options']['limitDL'] = [int(m.group(1))] - - m = re.search(ur'<td>Paušální stahování aktivní. Vyprší </td><td><strong>(.*?)</strong>', src) - if m: - validuntil = mktime(strptime(m.group(1), "%d.%m.%Y - %H:%M")) - return {"premium": True, "trafficleft": -1, "validuntil": validuntil} - - m = re.search(r'<tr><td>Kredit</td><td>(.*?) GiB', src) - 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/", cookies=True) - 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"}, cookies=True) diff --git a/pyload/plugins/accounts/ShareonlineBiz.py b/pyload/plugins/accounts/ShareonlineBiz.py deleted file mode 100644 index ff0cb1c58..000000000 --- a/pyload/plugins/accounts/ShareonlineBiz.py +++ /dev/null @@ -1,42 +0,0 @@ -# -*- coding: utf-8 -*- - -from pyload.plugins.base.Account import Account - - -class ShareonlineBiz(Account): - __name__ = "ShareonlineBiz" - __type__ = "account" - __version__ = "0.24" - - __description__ = """Share-online.biz account plugin""" - __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(): - 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} - - def login(self, user, data, req): - src = self.getUserAPI(user, req) - if "EXCEPTION" in src: - self.wrongPassword() diff --git a/pyload/plugins/accounts/SimplyPremiumCom.py b/pyload/plugins/accounts/SimplyPremiumCom.py deleted file mode 100644 index e9126a5cb..000000000 --- a/pyload/plugins/accounts/SimplyPremiumCom.py +++ /dev/null @@ -1,45 +0,0 @@ -# -*- coding: utf-8 -*- - -from pyload.utils import json_loads -from pyload.plugins.base.Account import Account - - -class SimplyPremiumCom(Account): - __name__ = "SimplyPremiumCom" - __type__ = "account" - __version__ = "0.01" - - __description__ = """Simply-Premium.com account plugin""" - __author_name__ = "EvolutionClip" - __author_mail__ = "evolutionclip@live.de" - - - def loadAccountInfo(self, user, req): - json_data = req.load('http://www.simply-premium.com/api/user.php?format=json') - self.logDebug("JSON data: " + json_data) - json_data = json_loads(json_data) - - if 'vip' in json_data['result'] and json_data['result']['vip'] == 0: - return {"premium": False} - - #Time package - validuntil = float(json_data['result']['timeend']) - #Traffic package - # {"trafficleft": int(traffic) / 1024, "validuntil": -1} - #trafficleft = int(json_data['result']['traffic'] / 1024) - - #return {"premium": True, "validuntil": validuntil, "trafficleft": trafficleft} - return {"premium": True, "validuntil": validuntil} - - def login(self, user, data, req): - req.cj.setCookie("simply-premium.com", "lang", "EN") - - if data['password'] == '' or data['password'] == '0': - post_data = {"key": user} - else: - post_data = {"login_name": user, "login_pass": data['password']} - - html = req.load("http://www.simply-premium.com/login.php", post=post_data) - - if 'logout' not in html: - self.wrongPassword() diff --git a/pyload/plugins/accounts/SimplydebridCom.py b/pyload/plugins/accounts/SimplydebridCom.py deleted file mode 100644 index 4af8eaa31..000000000 --- a/pyload/plugins/accounts/SimplydebridCom.py +++ /dev/null @@ -1,33 +0,0 @@ -# -*- coding: utf-8 -*- - -from time import mktime, strptime - -from pyload.plugins.base.Account import Account - - -class SimplydebridCom(Account): - __name__ = "SimplydebridCom" - __type__ = "account" - __version__ = "0.1" - - __description__ = """Simply-Debrid.com account plugin""" - __author_name__ = "Kagenoshin" - __author_mail__ = "kagenoshin@gmx.ch" - - - def loadAccountInfo(self, user, req): - get_data = {'login': 2, 'u': self.loginname, 'p': self.password} - response = req.load("http://simply-debrid.com/api.php", get=get_data, decode=True) - data = [x.strip() for x in response.split(";")] - if str(data[0]) != "1": - return {"premium": False} - else: - return {"trafficleft": -1, "validuntil": mktime(strptime(str(data[2]), "%d/%m/%Y"))} - - def login(self, user, data, req): - self.loginname = user - self.password = data['password'] - get_data = {'login': 1, 'u': self.loginname, 'p': self.password} - response = req.load("http://simply-debrid.com/api.php", get=get_data, decode=True) - if response != "02: loggin success": - self.wrongPassword() diff --git a/pyload/plugins/accounts/StahnuTo.py b/pyload/plugins/accounts/StahnuTo.py deleted file mode 100644 index ba4a3fcdd..000000000 --- a/pyload/plugins/accounts/StahnuTo.py +++ /dev/null @@ -1,34 +0,0 @@ -# -*- coding: utf-8 -*- - -import re - -from pyload.plugins.base.Account import Account -from pyload.utils import parseFileSize - - -class StahnuTo(Account): - __name__ = "StahnuTo" - __type__ = "account" - __version__ = "0.02" - - __description__ = """StahnuTo account plugin""" - __author_name__ = "zoidberg" - __author_mail__ = "zoidberg@mujmail.cz" - - - def loadAccountInfo(self, user, req): - html = req.load("http://www.stahnu.to/") - - m = re.search(r'>VIP: (\d+.*)<', html) - trafficleft = parseFileSize(m.group(1)) * 1024 if m else 0 - - return {"premium": trafficleft > (512 * 1024), "trafficleft": trafficleft, "validuntil": -1} - - def login(self, user, data, req): - html = req.load("http://www.stahnu.to/login.php", post={ - "username": user, - "password": data['password'], - "submit": "Login"}) - - if not '<a href="logout.php">' in html: - self.wrongPassword() diff --git a/pyload/plugins/accounts/TurbobitNet.py b/pyload/plugins/accounts/TurbobitNet.py deleted file mode 100644 index ba172d67e..000000000 --- a/pyload/plugins/accounts/TurbobitNet.py +++ /dev/null @@ -1,41 +0,0 @@ -# -*- coding: utf-8 -*- - -import re -from time import mktime, strptime - -from pyload.plugins.base.Account import Account - - -class TurbobitNet(Account): - __name__ = "TurbobitNet" - __type__ = "account" - __version__ = "0.01" - - __description__ = """TurbobitNet account plugin""" - __author_name__ = "zoidberg" - __author_mail__ = "zoidberg@mujmail.cz" - - - def loadAccountInfo(self, user, req): - html = req.load("http://turbobit.net") - - m = re.search(r'<u>Turbo Access</u> to ([0-9.]+)', html) - if m: - premium = True - validuntil = mktime(strptime(m.group(1), "%d.%m.%Y")) - else: - premium = False - validuntil = -1 - - return {"premium": premium, "trafficleft": -1, "validuntil": validuntil} - - def login(self, user, data, req): - req.cj.setCookie("turbobit.net", "user_lang", "en") - - html = req.load("http://turbobit.net/user/login", post={ - "user[login]": user, - "user[pass]": data['password'], - "user[submit]": "Login"}) - - if not '<div class="menu-item user-name">' in html: - self.wrongPassword() diff --git a/pyload/plugins/accounts/TusfilesNet.py b/pyload/plugins/accounts/TusfilesNet.py deleted file mode 100644 index c4d912022..000000000 --- a/pyload/plugins/accounts/TusfilesNet.py +++ /dev/null @@ -1,69 +0,0 @@ -# -*- coding: utf-8 -*- - -import re - -from time import mktime, strptime, gmtime - -from pyload.plugins.base.Account import Account -from pyload.plugins.internal.SimpleHoster import parseHtmlForm -from pyload.utils import parseFileSize - - -class TusfilesNet(Account): - __name__ = "TusfilesNet" - __type__ = "account" - __version__ = "0.01" - - __description__ = """ Tusfile.net account plugin """ - __author_name__ = "guidobelix" - __author_mail__ = "guidobelix@hotmail.it" - - VALID_UNTIL_PATTERN = r'<span class="label label-default">([^<]+)</span>' - TRAFFIC_LEFT_PATTERN = r'<td><img src="//www.tusfiles.net/i/icon/meter.png" alt=""/></td>\n<td> (?P<S>[^<]+)</td>' - - - def loadAccountInfo(self, user, req): - html = req.load("http://www.tusfiles.net/?op=my_account", decode=True) - - validuntil = None - trafficleft = None - premium = False - - m = re.search(self.VALID_UNTIL_PATTERN, html) - if m: - expiredate = m.group(1) - self.logDebug("Expire date: " + expiredate) - - try: - validuntil = mktime(strptime(expiredate, "%d %B %Y")) - except Exception, e: - self.logError(e) - - if validuntil > mktime(gmtime()): - premium = True - else: - premium = False - validuntil = None - - m = re.search(self.TRAFFIC_LEFT_PATTERN, html) - if m: - trafficleft = m.group(1) - if "Unlimited" in trafficleft: - trafficleft = -1 - else: - trafficleft = parseFileSize(trafficleft) * 1024 - - return {'validuntil': validuntil, 'trafficleft': trafficleft, 'premium': premium} - - - def login(self, user, data, req): - html = req.load("http://www.tusfiles.net/login.html", decode=True) - action, inputs = parseHtmlForm('name="FL"', html) - inputs.update({'login': user, - 'password': data['password'], - 'redirect': "http://www.tusfiles.net/"}) - - html = req.load("http://www.tusfiles.net/", post=inputs, decode=True) - - if 'Incorrect Login or Password' in html or '>Error<' in html: - self.wrongPassword() diff --git a/pyload/plugins/accounts/UlozTo.py b/pyload/plugins/accounts/UlozTo.py deleted file mode 100644 index 214607998..000000000 --- a/pyload/plugins/accounts/UlozTo.py +++ /dev/null @@ -1,45 +0,0 @@ -# -*- coding: utf-8 -*- - -import re - -from pyload.plugins.base.Account import Account - - -class UlozTo(Account): - __name__ = "UlozTo" - __type__ = "account" - __version__ = "0.06" - - __description__ = """Uloz.to account plugin""" - __author_name__ = ("zoidberg", "pulpe") - __author_mail__ = "zoidberg@mujmail.cz" - - TRAFFIC_LEFT_PATTERN = r'<li class="menu-kredit"><a href="/kredit" title="[^"]*?GB = ([0-9.]+) MB"' - - - def loadAccountInfo(self, user, req): - #this cookie gets lost somehow after each request - self.phpsessid = req.cj.getCookie("ULOSESSID") - html = req.load("http://www.ulozto.net/", decode=True) - req.cj.setCookie("www.ulozto.net", "ULOSESSID", self.phpsessid) - - m = re.search(self.TRAFFIC_LEFT_PATTERN, html) - trafficleft = int(float(m.group(1).replace(' ', '').replace(',', '.')) * 1000 * 1.048) if m else 0 - self.premium = True if trafficleft else False - - return {"validuntil": -1, "trafficleft": trafficleft} - - def login(self, user, data, req): - login_page = req.load('http://www.ulozto.net/?do=web-login', decode=True) - action = re.findall('<form action="(.+?)"', login_page)[1].replace('&', '&') - token = re.search('_token_" value="(.+?)"', login_page).group(1) - - html = req.load('http://www.ulozto.net'+action, post={ - "_token_": token, - "login": "Submit", - "password": data['password'], - "username": user - }, decode=True) - - if '<div class="flash error">' in html: - self.wrongPassword() diff --git a/pyload/plugins/accounts/UnrestrictLi.py b/pyload/plugins/accounts/UnrestrictLi.py deleted file mode 100644 index a93e88e2d..000000000 --- a/pyload/plugins/accounts/UnrestrictLi.py +++ /dev/null @@ -1,43 +0,0 @@ -# -*- coding: utf-8 -*- - -from pyload.plugins.base.Account import Account -from pyload.utils import json_loads - - -class UnrestrictLi(Account): - __name__ = "UnrestrictLi" - __type__ = "account" - __version__ = "0.03" - - __description__ = """Unrestrict.li account plugin""" - __author_name__ = "stickell" - __author_mail__ = "l.stickell@yahoo.it" - - - def loadAccountInfo(self, user, req): - json_data = req.load('http://unrestrict.li/api/jdownloader/user.php?format=json') - self.logDebug("JSON data: " + json_data) - json_data = json_loads(json_data) - - if 'vip' in json_data['result'] and json_data['result']['vip'] == 0: - return {"premium": False} - - validuntil = json_data['result']['expires'] - trafficleft = int(json_data['result']['traffic'] / 1024) - - return {"premium": True, "validuntil": validuntil, "trafficleft": trafficleft} - - def login(self, user, data, req): - req.cj.setCookie("unrestrict.li", "lang", "EN") - html = req.load("https://unrestrict.li/sign_in") - - if 'solvemedia' in html: - self.logError("A Captcha is required. Go to http://unrestrict.li/sign_in and login, then retry") - return - - post_data = {"username": user, "password": data['password'], - "remember_me": "remember", "signin": "Sign in"} - html = req.load("https://unrestrict.li/sign_in", post=post_data) - - if 'sign_out' not in html: - self.wrongPassword() diff --git a/pyload/plugins/accounts/UploadedTo.py b/pyload/plugins/accounts/UploadedTo.py deleted file mode 100644 index 2ef0117f7..000000000 --- a/pyload/plugins/accounts/UploadedTo.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- - -import re -from time import time - -from pyload.plugins.base.Account import Account - - -class UploadedTo(Account): - __name__ = "UploadedTo" - __type__ = "account" - __version__ = "0.26" - - __description__ = """Uploaded.to account plugin""" - __author_name__ = "mkaay" - __author_mail__ = "mkaay@mkaay.de" - - - def loadAccountInfo(self, user, req): - - req.load("http://uploaded.net/language/en") - html = req.load("http://uploaded.net/me") - - premium = '<a href="register"><em>Premium</em>' in html or '<em>Premium</em></th>' in html - - if premium: - raw_traffic = re.search(r'<th colspan="2"><b class="cB">([^<]+)', html).group(1).replace('.', '') - raw_valid = re.search(r"<td>Duration:</td>\s*<th>([^<]+)", html, re.MULTILINE).group(1).strip() - - traffic = int(self.parseTraffic(raw_traffic)) - - if raw_valid == "unlimited": - validuntil = -1 - else: - raw_valid = re.findall(r"(\d+) (Week|weeks|days|day|hours|hour)", raw_valid) - validuntil = time() - for n, u in raw_valid: - validuntil += int(n) * 60 * 60 * {"Week": 168, "weeks": 168, "days": 24, - "day": 24, "hours": 1, "hour": 1}[u] - - return {"validuntil": validuntil, "trafficleft": traffic, "maxtraffic": 50 * 1024 * 1024} - else: - return {"premium": False, "validuntil": -1} - - def login(self, user, data, req): - - req.load("http://uploaded.net/language/en") - req.cj.setCookie("uploaded.net", "lang", "en") - - page = req.load("http://uploaded.net/io/login", post={"id": user, "pw": data['password'], "_": ""}) - - if "User and password do not match!" in page: - self.wrongPassword() diff --git a/pyload/plugins/accounts/UploadheroCom.py b/pyload/plugins/accounts/UploadheroCom.py deleted file mode 100644 index 4cea86e35..000000000 --- a/pyload/plugins/accounts/UploadheroCom.py +++ /dev/null @@ -1,40 +0,0 @@ -# -*- coding: utf-8 -*- - -import re -import datetime -import time - -from pyload.plugins.base.Account import Account - - -class UploadheroCom(Account): - __name__ = "UploadheroCom" - __type__ = "account" - __version__ = "0.2" - - __description__ = """Uploadhero.co account plugin""" - __author_name__ = "mcmyst" - __author_mail__ = "mcmyst@hotmail.fr" - - - def loadAccountInfo(self, user, req): - premium_pattern = re.compile('Il vous reste <span class="bleu">([0-9]+)</span> jours premium.') - - data = self.getAccountData(user) - page = req.load("http://uploadhero.co/my-account") - - if premium_pattern.search(page): - end_date = datetime.date.today() + datetime.timedelta(days=int(premium_pattern.search(page).group(1))) - end_date = time.mktime(future.timetuple()) - account_info = {"validuntil": end_date, "trafficleft": -1, "premium": True} - else: - account_info = {"validuntil": -1, "trafficleft": -1, "premium": False} - - return account_info - - def login(self, user, data, req): - page = req.load("http://uploadhero.co/lib/connexion.php", - post={"pseudo_login": user, "password_login": data['password']}) - - if "mot de passe invalide" in page: - self.wrongPassword() diff --git a/pyload/plugins/accounts/UploadingCom.py b/pyload/plugins/accounts/UploadingCom.py deleted file mode 100644 index 0f7d33ec8..000000000 --- a/pyload/plugins/accounts/UploadingCom.py +++ /dev/null @@ -1,40 +0,0 @@ -# -*- coding: utf-8 -*- - -from time import time, strptime, mktime -import re - -from pyload.plugins.base.Account import Account - - -class UploadingCom(Account): - __name__ = "UploadingCom" - __type__ = "account" - __version__ = "0.1" - - __description__ = """Uploading.com account plugin""" - __author_name__ = "mkaay" - __author_mail__ = "mkaay@mkaay.de" - - - def loadAccountInfo(self, user, req): - src = req.load("http://uploading.com/") - premium = True - if "UPGRADE TO PREMIUM" in src: - return {"validuntil": -1, "trafficleft": -1, "premium": False} - - m = re.search("Valid Until:(.*?)<", src) - if m: - validuntil = int(mktime(strptime(m.group(1).strip(), "%b %d, %Y"))) - else: - validuntil = -1 - - return {"validuntil": validuntil, "trafficleft": -1, "premium": True} - - def login(self, user, data, req): - req.cj.setCookie("uploading.com", "lang", "1") - req.cj.setCookie("uploading.com", "language", "1") - req.cj.setCookie("uploading.com", "setlang", "en") - req.cj.setCookie("uploading.com", "_lang", "en") - req.load("http://uploading.com/") - req.load("http://uploading.com/general/login_form/?JsHttpRequest=%s-xml" % long(time() * 1000), - post={"email": user, "password": data['password'], "remember": "on"}) diff --git a/pyload/plugins/accounts/UptoboxCom.py b/pyload/plugins/accounts/UptoboxCom.py deleted file mode 100644 index 7f9618da8..000000000 --- a/pyload/plugins/accounts/UptoboxCom.py +++ /dev/null @@ -1,17 +0,0 @@ -# -*- coding: utf-8 -*- - -from pyload.plugins.internal.XFSPAccount import XFSPAccount - - -class UptoboxCom(XFSPAccount): - __name__ = "UptoboxCom" - __type__ = "account" - __version__ = "0.02" - - __description__ = """DDLStorage.com account plugin""" - __author_name__ = "zoidberg" - __author_mail__ = "zoidberg@mujmail.cz" - - MAIN_PAGE = "http://uptobox.com/" - - VALID_UNTIL_PATTERN = r'>Premium.[Aa]ccount expire: ([^<]+)</strong>' diff --git a/pyload/plugins/accounts/YibaishiwuCom.py b/pyload/plugins/accounts/YibaishiwuCom.py deleted file mode 100644 index 6cb595d06..000000000 --- a/pyload/plugins/accounts/YibaishiwuCom.py +++ /dev/null @@ -1,38 +0,0 @@ -# -*- coding: utf-8 -*- - -import re - -from pyload.plugins.base.Account import Account - - -class YibaishiwuCom(Account): - __name__ = "YibaishiwuCom" - __type__ = "account" - __version__ = "0.01" - - __description__ = """115.com account plugin""" - __author_name__ = "zoidberg" - __author_mail__ = "zoidberg@mujmail.cz" - - ACCOUNT_INFO_PATTERN = r'var USER_PERMISSION = {(.*?)}' - - - def loadAccountInfo(self, user, req): - #self.relogin(user) - html = req.load("http://115.com/", decode=True) - - m = re.search(self.ACCOUNT_INFO_PATTERN, html, re.S) - premium = True if (m and 'is_vip: 1' in m.group(1)) else False - validuntil = trafficleft = (-1 if m else 0) - return dict({"validuntil": validuntil, "trafficleft": trafficleft, "premium": premium}) - - def login(self, user, data, req): - html = req.load('http://passport.115.com/?ac=login', post={ - "back": "http://www.115.com/", - "goto": "http://115.com/", - "login[account]": user, - "login[passwd]": data['password'] - }, decode=True) - - if not 'var USER_PERMISSION = {' in html: - self.wrongPassword() diff --git a/pyload/plugins/accounts/ZeveraCom.py b/pyload/plugins/accounts/ZeveraCom.py deleted file mode 100644 index 6d70a2e6b..000000000 --- a/pyload/plugins/accounts/ZeveraCom.py +++ /dev/null @@ -1,54 +0,0 @@ -# -*- coding: utf-8 -*- - -from time import mktime, strptime - -from pyload.plugins.base.Account import Account - - -class ZeveraCom(Account): - __name__ = "ZeveraCom" - __type__ = "account" - __version__ = "0.21" - - __description__ = """Zevera.com account plugin""" - __author_name__ = "zoidberg" - __author_mail__ = "zoidberg@mujmail.cz" - - - def loadAccountInfo(self, user, req): - data = self.getAPIData(req) - if data == "No traffic": - account_info = {"trafficleft": 0, "validuntil": 0, "premium": False} - else: - account_info = { - "trafficleft": int(data['availabletodaytraffic']) * 1024, - "validuntil": mktime(strptime(data['endsubscriptiondate'], "%Y/%m/%d %H:%M:%S")), - "premium": True - } - return account_info - - def login(self, user, data, req): - self.loginname = user - self.password = data['password'] - if self.getAPIData(req) == "No traffic": - self.wrongPassword() - - def getAPIData(self, req, just_header=False, **kwargs): - get_data = { - 'cmd': 'accountinfo', - 'login': self.loginname, - 'pass': self.password - } - get_data.update(kwargs) - - response = req.load("http://www.zevera.com/jDownloader.ashx", get=get_data, - decode=True, just_header=just_header) - self.logDebug(response) - - if ':' in response: - if not just_header: - response = response.replace(',', '\n') - return dict((y.strip().lower(), z.strip()) for (y, z) in - [x.split(':', 1) for x in response.splitlines() if ':' in x]) - else: - return response diff --git a/pyload/plugins/accounts/__init__.py b/pyload/plugins/accounts/__init__.py deleted file mode 100644 index e69de29bb..000000000 -- cgit v1.2.3