From ec6e5dc7fcdcefee10e37d22473c9accae1104cf Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 29 Sep 2015 20:05:07 +0200 Subject: Account class completely rewritten + plugins updated --- module/plugins/accounts/AlldebridCom.py | 14 +++-- module/plugins/accounts/AniStreamCom.py | 4 +- module/plugins/accounts/BackinNet.py | 4 +- module/plugins/accounts/BitshareCom.py | 8 +-- module/plugins/accounts/CatShareNet.py | 6 +- module/plugins/accounts/CloudsixMe.py | 4 +- module/plugins/accounts/CloudzillaTo.py | 6 +- module/plugins/accounts/CramitIn.py | 4 +- module/plugins/accounts/CzshareCom.py | 6 +- module/plugins/accounts/DebridItaliaCom.py | 10 +++- module/plugins/accounts/DepositfilesCom.py | 6 +- module/plugins/accounts/EasybytezCom.py | 9 ++- module/plugins/accounts/EuroshareEu.py | 6 +- module/plugins/accounts/ExashareCom.py | 4 +- module/plugins/accounts/FastixRu.py | 9 ++- module/plugins/accounts/FastshareCz.py | 8 +-- module/plugins/accounts/File4SafeCom.py | 4 +- module/plugins/accounts/FileParadoxIn.py | 4 +- module/plugins/accounts/FilecloudIo.py | 8 +-- module/plugins/accounts/FilefactoryCom.py | 10 ++-- module/plugins/accounts/FilejungleCom.py | 6 +- module/plugins/accounts/FileomCom.py | 4 +- module/plugins/accounts/FilerNet.py | 6 +- module/plugins/accounts/FilerioCom.py | 4 +- module/plugins/accounts/FilesMailRu.py | 6 +- module/plugins/accounts/FileserveCom.py | 8 +-- module/plugins/accounts/FourSharedCom.py | 8 +-- module/plugins/accounts/FreakshareCom.py | 6 +- module/plugins/accounts/FreeWayMe.py | 20 +++++-- module/plugins/accounts/FshareVn.py | 6 +- module/plugins/accounts/Ftp.py | 2 +- module/plugins/accounts/HellshareCz.py | 12 ++-- module/plugins/accounts/HighWayMe.py | 12 +++- module/plugins/accounts/Http.py | 2 +- module/plugins/accounts/HugefilesNet.py | 4 +- module/plugins/accounts/HundredEightyUploadCom.py | 4 +- module/plugins/accounts/JunkyvideoCom.py | 4 +- module/plugins/accounts/JunocloudMe.py | 4 +- module/plugins/accounts/Keep2ShareCc.py | 8 +-- module/plugins/accounts/LetitbitNet.py | 6 +- module/plugins/accounts/LinksnappyCom.py | 14 +++-- module/plugins/accounts/MegaDebridEu.py | 20 +++++-- module/plugins/accounts/MegaRapidCz.py | 7 +-- module/plugins/accounts/MegaRapidoNet.py | 67 ++++++++++++++++++++++- module/plugins/accounts/MegasharesCom.py | 6 +- module/plugins/accounts/MovReelCom.py | 4 +- module/plugins/accounts/MultihostersCom.py | 4 +- module/plugins/accounts/MultishareCz.py | 13 ++++- module/plugins/accounts/MyfastfileCom.py | 13 ++++- module/plugins/accounts/NitroflareCom.py | 6 +- module/plugins/accounts/NoPremiumPl.py | 30 +++++----- module/plugins/accounts/NosuploadCom.py | 4 +- module/plugins/accounts/NovafileCom.py | 4 +- module/plugins/accounts/NowVideoSx.py | 6 +- module/plugins/accounts/OboomCom.py | 17 +++--- module/plugins/accounts/OneFichierCom.py | 8 +-- module/plugins/accounts/OverLoadMe.py | 13 +++-- module/plugins/accounts/PremiumTo.py | 21 ++++--- module/plugins/accounts/PremiumizeMe.py | 23 +++++++- module/plugins/accounts/PutdriveCom.py | 4 +- module/plugins/accounts/QuickshareCz.py | 6 +- module/plugins/accounts/RPNetBiz.py | 27 +++++++-- module/plugins/accounts/RapideoPl.py | 30 +++++----- module/plugins/accounts/RapidfileshareNet.py | 4 +- module/plugins/accounts/RapidgatorNet.py | 10 ++-- module/plugins/accounts/RapiduNet.py | 6 +- module/plugins/accounts/RarefileNet.py | 4 +- module/plugins/accounts/RealdebridCom.py | 11 +++- module/plugins/accounts/RehostTo.py | 13 ++++- module/plugins/accounts/RyushareCom.py | 4 +- module/plugins/accounts/SafesharingEu.py | 4 +- module/plugins/accounts/SecureUploadEu.py | 4 +- module/plugins/accounts/SendmywayCom.py | 4 +- module/plugins/accounts/SharebeastCom.py | 4 +- module/plugins/accounts/ShareonlineBiz.py | 14 ++--- module/plugins/accounts/SimplyPremiumCom.py | 17 ++++-- module/plugins/accounts/SimplydebridCom.py | 11 +++- module/plugins/accounts/SmoozedCom.py | 16 ++++-- module/plugins/accounts/StreamcloudEu.py | 4 +- module/plugins/accounts/TurbobitNet.py | 8 +-- module/plugins/accounts/TusfilesNet.py | 4 +- module/plugins/accounts/UlozTo.py | 6 +- module/plugins/accounts/UploadableCh.py | 6 +- module/plugins/accounts/UploadcCom.py | 4 +- module/plugins/accounts/UploadedTo.py | 6 +- module/plugins/accounts/UploadheroCom.py | 7 +-- module/plugins/accounts/UploadingCom.py | 8 +-- module/plugins/accounts/UptoboxCom.py | 6 +- module/plugins/accounts/VidPlayNet.py | 4 +- module/plugins/accounts/WebshareCz.py | 8 +-- module/plugins/accounts/WorldbytezCom.py | 4 +- module/plugins/accounts/XFileSharingPro.py | 12 ++-- module/plugins/accounts/YibaishiwuCom.py | 6 +- module/plugins/accounts/ZeveraCom.py | 33 ++++++----- 94 files changed, 527 insertions(+), 338 deletions(-) (limited to 'module/plugins/accounts') diff --git a/module/plugins/accounts/AlldebridCom.py b/module/plugins/accounts/AlldebridCom.py index 845c1b835..357dd5380 100644 --- a/module/plugins/accounts/AlldebridCom.py +++ b/module/plugins/accounts/AlldebridCom.py @@ -12,7 +12,7 @@ from module.plugins.internal.Account import Account class AlldebridCom(Account): __name__ = "AlldebridCom" __type__ = "account" - __version__ = "0.27" + __version__ = "0.28" __status__ = "testing" __description__ = """AllDebrid.com account plugin""" @@ -20,8 +20,13 @@ class AlldebridCom(Account): __authors__ = [("Andy Voigt", "spamsales@online.de")] - def grab_info(self, user, password, data, req): - data = self.get_data(user) + def grab_hosters(self, user, password, data): + html = self.load("https://www.alldebrid.com/api.php", + get={'action': "get_host"}).replace("\"", "").strip() + return [x.strip() for x in html.split(",") if x.strip()] + + + def grab_info(self, user, password, data): html = self.load("http://www.alldebrid.com/account/") soup = BeautifulSoup.BeautifulSoup(html) @@ -38,7 +43,6 @@ class AlldebridCom(Account): #: Get expiration date from API except Exception: - data = self.get_data(user) html = self.load("https://www.alldebrid.com/api.php", get={'action': "info_user", 'login' : user, @@ -54,7 +58,7 @@ class AlldebridCom(Account): 'premium' : True } - def login(self, user, password, data, req): + def signin(self, user, password, data): html = self.load("https://www.alldebrid.com/register/", get={'action' : "login", 'login_login' : user, diff --git a/module/plugins/accounts/AniStreamCom.py b/module/plugins/accounts/AniStreamCom.py index 53ca1d5b8..5c7ac9fff 100644 --- a/module/plugins/accounts/AniStreamCom.py +++ b/module/plugins/accounts/AniStreamCom.py @@ -6,7 +6,7 @@ from module.plugins.internal.XFSAccount import XFSAccount class AniStreamCom(XFSAccount): __name__ = "AniStreamCom" __type__ = "account" - __version__ = "0.01" + __version__ = "0.02" __status__ = "testing" __description__ = """Ani-Stream.com account plugin""" @@ -14,4 +14,4 @@ class AniStreamCom(XFSAccount): __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] - HOSTER_DOMAIN = "ani-stream.com" + PLUGIN_DOMAIN = "ani-stream.com" diff --git a/module/plugins/accounts/BackinNet.py b/module/plugins/accounts/BackinNet.py index 58939c13a..d903f020c 100644 --- a/module/plugins/accounts/BackinNet.py +++ b/module/plugins/accounts/BackinNet.py @@ -6,7 +6,7 @@ from module.plugins.internal.XFSAccount import XFSAccount class BackinNet(XFSAccount): __name__ = "BackinNet" __type__ = "account" - __version__ = "0.02" + __version__ = "0.03" __status__ = "testing" __description__ = """Backin.net account plugin""" @@ -14,4 +14,4 @@ class BackinNet(XFSAccount): __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] - HOSTER_DOMAIN = "backin.net" + PLUGIN_DOMAIN = "backin.net" diff --git a/module/plugins/accounts/BitshareCom.py b/module/plugins/accounts/BitshareCom.py index 16eeb02b2..e8028b9d0 100644 --- a/module/plugins/accounts/BitshareCom.py +++ b/module/plugins/accounts/BitshareCom.py @@ -6,7 +6,7 @@ from module.plugins.internal.Account import Account class BitshareCom(Account): __name__ = "BitshareCom" __type__ = "account" - __version__ = "0.16" + __version__ = "0.17" __status__ = "testing" __description__ = """Bitshare account plugin""" @@ -14,7 +14,7 @@ class BitshareCom(Account): __authors__ = [("Paul King", None)] - def grab_info(self, user, password, data, req): + def grab_info(self, user, password, data): html = self.load("http://bitshare.com/mysettings.html") if "\"http://bitshare.com/myupgrade.html\">Free" in html: @@ -26,11 +26,11 @@ class BitshareCom(Account): return {'validuntil': -1, 'trafficleft': -1, 'premium': True} - def login(self, user, password, data, req): + def signin(self, user, password, data): html = self.load("https://bitshare.com/login.html", post={'user' : user, 'password': password, 'submit' : "Login"}) - if "login" in req.lastEffectiveURL: + if "login" in self.req.lastEffectiveURL: self.fail_login() diff --git a/module/plugins/accounts/CatShareNet.py b/module/plugins/accounts/CatShareNet.py index a8a164352..6e11064a6 100644 --- a/module/plugins/accounts/CatShareNet.py +++ b/module/plugins/accounts/CatShareNet.py @@ -9,7 +9,7 @@ from module.plugins.internal.Account import Account class CatShareNet(Account): __name__ = "CatShareNet" __type__ = "account" - __version__ = "0.09" + __version__ = "0.10" __status__ = "testing" __description__ = """Catshare.net account plugin""" @@ -22,7 +22,7 @@ class CatShareNet(Account): TRAFFIC_LEFT_PATTERN = r'([0-9.]+ [kMG]B)' - def grab_info(self, user, password, data, req): + def grab_info(self, user, password, data): premium = False validuntil = -1 trafficleft = -1 @@ -50,7 +50,7 @@ class CatShareNet(Account): return {'premium': premium, 'trafficleft': trafficleft, 'validuntil': validuntil} - def login(self, user, password, data, req): + def signin(self, user, password, data): html = self.load("http://catshare.net/login", #@TODO: Revert to `https` in 0.4.10 post={'user_email' : user, 'user_password' : password, diff --git a/module/plugins/accounts/CloudsixMe.py b/module/plugins/accounts/CloudsixMe.py index 973e37044..3410af002 100644 --- a/module/plugins/accounts/CloudsixMe.py +++ b/module/plugins/accounts/CloudsixMe.py @@ -6,7 +6,7 @@ from module.plugins.internal.XFSAccount import XFSAccount class CloudsixMe(XFSAccount): __name__ = "CloudsixMe" __type__ = "account" - __version__ = "0.01" + __version__ = "0.02" __status__ = "testing" __description__ = """Cloudsix.me account plugin""" @@ -14,4 +14,4 @@ class CloudsixMe(XFSAccount): __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] - HOSTER_DOMAIN = "cloudsix.me" + PLUGIN_DOMAIN = "cloudsix.me" diff --git a/module/plugins/accounts/CloudzillaTo.py b/module/plugins/accounts/CloudzillaTo.py index 127e226a2..821975ef0 100644 --- a/module/plugins/accounts/CloudzillaTo.py +++ b/module/plugins/accounts/CloudzillaTo.py @@ -8,7 +8,7 @@ from module.plugins.internal.Account import Account class CloudzillaTo(Account): __name__ = "CloudzillaTo" __type__ = "account" - __version__ = "0.05" + __version__ = "0.06" __status__ = "testing" __description__ = """Cloudzilla.to account plugin""" @@ -19,7 +19,7 @@ class CloudzillaTo(Account): PREMIUM_PATTERN = r'

account type

\s*Premium Account' - def grab_info(self, user, password, data, req): + def grab_info(self, user, password, data): html = self.load("http://www.cloudzilla.to/") premium = True if re.search(self.PREMIUM_PATTERN, html) else False @@ -27,7 +27,7 @@ class CloudzillaTo(Account): return {'validuntil': -1, 'trafficleft': -1, 'premium': premium} - def login(self, user, password, data, req): + def signin(self, user, password, data): html = self.load("https://www.cloudzilla.to/", post={'lusername': user, 'lpassword': password, diff --git a/module/plugins/accounts/CramitIn.py b/module/plugins/accounts/CramitIn.py index d3f2e0d77..084aa79a6 100644 --- a/module/plugins/accounts/CramitIn.py +++ b/module/plugins/accounts/CramitIn.py @@ -6,7 +6,7 @@ from module.plugins.internal.XFSAccount import XFSAccount class CramitIn(XFSAccount): __name__ = "CramitIn" __type__ = "account" - __version__ = "0.04" + __version__ = "0.05" __status__ = "testing" __description__ = """Cramit.in account plugin""" @@ -14,4 +14,4 @@ class CramitIn(XFSAccount): __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - HOSTER_DOMAIN = "cramit.in" + PLUGIN_DOMAIN = "cramit.in" diff --git a/module/plugins/accounts/CzshareCom.py b/module/plugins/accounts/CzshareCom.py index 77d1073ca..448722dd9 100644 --- a/module/plugins/accounts/CzshareCom.py +++ b/module/plugins/accounts/CzshareCom.py @@ -9,7 +9,7 @@ from module.plugins.internal.Account import Account class CzshareCom(Account): __name__ = "CzshareCom" __type__ = "account" - __version__ = "0.21" + __version__ = "0.22" __status__ = "testing" __description__ = """Czshare.com account plugin, now Sdilej.cz""" @@ -21,7 +21,7 @@ class CzshareCom(Account): CREDIT_LEFT_PATTERN = r'\s*([\d ,]+) (KiB|MiB|GiB)\s*([^<]*)\s*' - def grab_info(self, user, password, data, req): + def grab_info(self, user, password, data): premium = False validuntil = None trafficleft = None @@ -44,7 +44,7 @@ class CzshareCom(Account): 'trafficleft': trafficleft} - def login(self, user, password, data, req): + def signin(self, user, password, data): html = self.load('https://sdilej.cz/index.php', post={'Prihlasit' : "Prihlasit", "login-password": password, diff --git a/module/plugins/accounts/DebridItaliaCom.py b/module/plugins/accounts/DebridItaliaCom.py index 35fd6262e..fee7925e7 100644 --- a/module/plugins/accounts/DebridItaliaCom.py +++ b/module/plugins/accounts/DebridItaliaCom.py @@ -9,7 +9,7 @@ from module.plugins.internal.Account import Account class DebridItaliaCom(Account): __name__ = "DebridItaliaCom" __type__ = "account" - __version__ = "0.16" + __version__ = "0.17" __status__ = "testing" __description__ = """Debriditalia.com account plugin""" @@ -21,7 +21,11 @@ class DebridItaliaCom(Account): WALID_UNTIL_PATTERN = r'Premium valid till: (.+?) \|' - def grab_info(self, user, password, data, req): + def grab_hosters(self, user, password, data): + return self.load("http://debriditalia.com/api.php", get={'hosts': ""}).replace('"', '').split(',') + + + def grab_info(self, user, password, data): info = {'premium': False, 'validuntil': None, 'trafficleft': None} html = self.load("http://debriditalia.com/") @@ -36,7 +40,7 @@ class DebridItaliaCom(Account): return info - def login(self, user, password, data, req): + def signin(self, user, password, data): html = self.load("https://debriditalia.com/login.php", get={'u': user, 'p': password}) diff --git a/module/plugins/accounts/DepositfilesCom.py b/module/plugins/accounts/DepositfilesCom.py index 6e4bf9a1b..35df3f939 100644 --- a/module/plugins/accounts/DepositfilesCom.py +++ b/module/plugins/accounts/DepositfilesCom.py @@ -9,7 +9,7 @@ from module.plugins.internal.Account import Account class DepositfilesCom(Account): __name__ = "DepositfilesCom" __type__ = "account" - __version__ = "0.35" + __version__ = "0.36" __status__ = "testing" __description__ = """Depositfiles.com account plugin""" @@ -19,7 +19,7 @@ class DepositfilesCom(Account): ("Walter Purcaro", "vuolter@gmail.com")] - def grab_info(self, user, password, data, req): + def grab_info(self, user, password, data): html = self.load("https://dfiles.eu/de/gold/") validuntil = re.search(r"Sie haben Gold Zugang bis: (.*?)", html).group(1) @@ -28,7 +28,7 @@ class DepositfilesCom(Account): return {'validuntil': validuntil, 'trafficleft': -1} - def login(self, user, password, data, req): + def signin(self, user, password, data): html = self.load("https://dfiles.eu/de/login.php", get={'return': "/de/gold/payment.php"}, post={'login' : user, diff --git a/module/plugins/accounts/EasybytezCom.py b/module/plugins/accounts/EasybytezCom.py index 5e1a4f962..3f8254117 100644 --- a/module/plugins/accounts/EasybytezCom.py +++ b/module/plugins/accounts/EasybytezCom.py @@ -8,7 +8,7 @@ from module.plugins.internal.XFSAccount import XFSAccount class EasybytezCom(XFSAccount): __name__ = "EasybytezCom" __type__ = "account" - __version__ = "0.13" + __version__ = "0.14" __status__ = "testing" __description__ = """EasyBytez.com account plugin""" @@ -17,4 +17,9 @@ class EasybytezCom(XFSAccount): ("guidobelix", "guidobelix@hotmail.it")] - HOSTER_DOMAIN = "easybytez.com" + PLUGIN_DOMAIN = "easybytez.com" + + + def grab_hosters(self, user, password, data): + return re.search(r'\s*Supported sites:(.*)', + self.load("http://www.easybytez.com")).group(1).split(',') diff --git a/module/plugins/accounts/EuroshareEu.py b/module/plugins/accounts/EuroshareEu.py index 2b90bfc13..09f08dc01 100644 --- a/module/plugins/accounts/EuroshareEu.py +++ b/module/plugins/accounts/EuroshareEu.py @@ -9,7 +9,7 @@ from module.plugins.internal.Account import Account class EuroshareEu(Account): __name__ = "EuroshareEu" __type__ = "account" - __version__ = "0.05" + __version__ = "0.06" __status__ = "testing" __description__ = """Euroshare.eu account plugin""" @@ -17,7 +17,7 @@ class EuroshareEu(Account): __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - def grab_info(self, user, password, data, req): + def grab_info(self, user, password, data): self.relogin(user) html = self.load("http://euroshare.eu/customer-zone/settings/") @@ -32,7 +32,7 @@ class EuroshareEu(Account): return {'validuntil': validuntil, 'trafficleft': -1, 'premium': premium} - def login(self, user, password, data, req): + def signin(self, user, password, data): html = self.load('http://euroshare.eu/customer-zone/login/', post={'trvale' : "1", 'login' : user, diff --git a/module/plugins/accounts/ExashareCom.py b/module/plugins/accounts/ExashareCom.py index 26594c702..6b352e40e 100644 --- a/module/plugins/accounts/ExashareCom.py +++ b/module/plugins/accounts/ExashareCom.py @@ -6,7 +6,7 @@ from module.plugins.internal.XFSAccount import XFSAccount class ExashareCom(XFSAccount): __name__ = "ExashareCom" __type__ = "account" - __version__ = "0.02" + __version__ = "0.03" __status__ = "testing" __description__ = """Exashare.com account plugin""" @@ -14,4 +14,4 @@ class ExashareCom(XFSAccount): __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] - HOSTER_DOMAIN = "exashare.com" + PLUGIN_DOMAIN = "exashare.com" diff --git a/module/plugins/accounts/FastixRu.py b/module/plugins/accounts/FastixRu.py index 31e7d8bca..f48dfee5f 100644 --- a/module/plugins/accounts/FastixRu.py +++ b/module/plugins/accounts/FastixRu.py @@ -7,7 +7,7 @@ from module.common.json_layer import json_loads class FastixRu(Account): __name__ = "FastixRu" __type__ = "account" - __version__ = "0.07" + __version__ = "0.08" __status__ = "testing" __description__ = """Fastix account plugin""" @@ -15,7 +15,7 @@ class FastixRu(Account): __authors__ = [("Massimo Rosamilia", "max@spiritix.eu")] - def grab_hosters(self, user, password, data, req): + def grab_hosters(self, user, password, data): html = self.load("http://fastix.ru/api_v2", get={'apikey': "5182964c3f8f9a7f0b00000a_kelmFB4n1IrnCDYuIFn2y", 'sub' : "allowed_sources"}) @@ -24,8 +24,7 @@ class FastixRu(Account): return host_list - def grab_info(self, user, password, data, req): - data = self.get_data(user) + def grab_info(self, user, password, data): html = json_loads(self.load("http://fastix.ru/api_v2/", get={'apikey': data['apikey'], 'sub' : "getaccountdetails"})) @@ -40,7 +39,7 @@ class FastixRu(Account): return account_info - def login(self, user, password, data, req): + def signin(self, user, password, data): api = json_loads(self.load("https://fastix.ru/api_v2/", get={'sub' : "get_apikey", 'email' : user, diff --git a/module/plugins/accounts/FastshareCz.py b/module/plugins/accounts/FastshareCz.py index 6cf2551d0..a6a2e2ac6 100644 --- a/module/plugins/accounts/FastshareCz.py +++ b/module/plugins/accounts/FastshareCz.py @@ -9,7 +9,7 @@ from module.plugins.internal.Plugin import set_cookie class FastshareCz(Account): __name__ = "FastshareCz" __type__ = "account" - __version__ = "0.10" + __version__ = "0.11" __status__ = "testing" __description__ = """Fastshare.cz account plugin""" @@ -21,7 +21,7 @@ class FastshareCz(Account): CREDIT_PATTERN = r'Credit\s*:\s*\s*(.+?)\s*<' - def grab_info(self, user, password, data, req): + def grab_info(self, user, password, data): validuntil = -1 trafficleft = None premium = False @@ -39,8 +39,8 @@ class FastshareCz(Account): 'premium' : premium} - def login(self, user, password, data, req): - set_cookie(req.cj, "fastshare.cz", "lang", "en") + def signin(self, user, password, data): + set_cookie(self.req.cj, "fastshare.cz", "lang", "en") self.load('http://www.fastshare.cz/login') #@NOTE: Do not remove or it will not login diff --git a/module/plugins/accounts/File4SafeCom.py b/module/plugins/accounts/File4SafeCom.py index 54c3a2359..8e5f437b3 100644 --- a/module/plugins/accounts/File4SafeCom.py +++ b/module/plugins/accounts/File4SafeCom.py @@ -6,7 +6,7 @@ from module.plugins.internal.XFSAccount import XFSAccount class File4SafeCom(XFSAccount): __name__ = "File4SafeCom" __type__ = "account" - __version__ = "0.06" + __version__ = "0.07" __status__ = "testing" __description__ = """File4Safe.com account plugin""" @@ -14,6 +14,6 @@ class File4SafeCom(XFSAccount): __authors__ = [("stickell", "l.stickell@yahoo.it")] - HOSTER_DOMAIN = "file4safe.com" + PLUGIN_DOMAIN = "file4safe.com" LOGIN_FAIL_PATTERN = r'input_login' diff --git a/module/plugins/accounts/FileParadoxIn.py b/module/plugins/accounts/FileParadoxIn.py index 21f43be6e..86183f4d3 100644 --- a/module/plugins/accounts/FileParadoxIn.py +++ b/module/plugins/accounts/FileParadoxIn.py @@ -6,7 +6,7 @@ from module.plugins.internal.XFSAccount import XFSAccount class FileParadoxIn(XFSAccount): __name__ = "FileParadoxIn" __type__ = "account" - __version__ = "0.03" + __version__ = "0.04" __status__ = "testing" __description__ = """FileParadox.in account plugin""" @@ -14,4 +14,4 @@ class FileParadoxIn(XFSAccount): __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] - HOSTER_DOMAIN = "fileparadox.in" + PLUGIN_DOMAIN = "fileparadox.in" diff --git a/module/plugins/accounts/FilecloudIo.py b/module/plugins/accounts/FilecloudIo.py index 075778af4..d80a8b9d6 100644 --- a/module/plugins/accounts/FilecloudIo.py +++ b/module/plugins/accounts/FilecloudIo.py @@ -8,7 +8,7 @@ from module.plugins.internal.Plugin import set_cookie class FilecloudIo(Account): __name__ = "FilecloudIo" __type__ = "account" - __version__ = "0.08" + __version__ = "0.09" __status__ = "testing" __description__ = """FilecloudIo account plugin""" @@ -17,7 +17,7 @@ class FilecloudIo(Account): ("stickell", "l.stickell@yahoo.it")] - def grab_info(self, user, password, data, req): + def grab_info(self, user, password, data): #: It looks like the first API request always fails, so we retry 5 times, it should work on the second try for _i in xrange(5): rep = self.load("https://secure.filecloud.io/api-fetch_apikey.api", @@ -43,8 +43,8 @@ class FilecloudIo(Account): return {'premium': False} - def login(self, user, password, data, req): - set_cookie(req.cj, "secure.filecloud.io", "lang", "en") + def signin(self, user, password, data): + set_cookie(self.req.cj, "secure.filecloud.io", "lang", "en") html = self.load('https://secure.filecloud.io/user-login.html') if not hasattr(self, "form_data"): diff --git a/module/plugins/accounts/FilefactoryCom.py b/module/plugins/accounts/FilefactoryCom.py index 69b1a7d7e..0bb814039 100644 --- a/module/plugins/accounts/FilefactoryCom.py +++ b/module/plugins/accounts/FilefactoryCom.py @@ -10,7 +10,7 @@ from module.plugins.internal.Account import Account class FilefactoryCom(Account): __name__ = "FilefactoryCom" __type__ = "account" - __version__ = "0.18" + __version__ = "0.19" __status__ = "testing" __description__ = """Filefactory.com account plugin""" @@ -22,7 +22,7 @@ class FilefactoryCom(Account): VALID_UNTIL_PATTERN = r'Premium valid until: (?P\d{1,2})\w{1,2} (?P\w{3}), (?P\d{4})' - def grab_info(self, user, password, data, req): + def grab_info(self, user, password, data): html = self.load("http://www.filefactory.com/account/") m = re.search(self.VALID_UNTIL_PATTERN, html) @@ -37,13 +37,13 @@ class FilefactoryCom(Account): return {'premium': premium, 'trafficleft': -1, 'validuntil': validuntil} - def login(self, user, password, data, req): - req.http.c.setopt(pycurl.REFERER, "http://www.filefactory.com/member/login.php") + def signin(self, user, password, data): + self.req.http.c.setopt(pycurl.REFERER, "http://www.filefactory.com/member/login.php") html = self.load("https://www.filefactory.com/member/signin.php", post={'loginEmail' : user, 'loginPassword': password, 'Submit' : "Sign In"}) - if req.lastEffectiveURL != "http://www.filefactory.com/account/": + if self.req.lastEffectiveURL != "http://www.filefactory.com/account/": self.fail_login() diff --git a/module/plugins/accounts/FilejungleCom.py b/module/plugins/accounts/FilejungleCom.py index a2ab676ee..a7a1c3f56 100644 --- a/module/plugins/accounts/FilejungleCom.py +++ b/module/plugins/accounts/FilejungleCom.py @@ -10,7 +10,7 @@ from module.plugins.internal.Account import Account class FilejungleCom(Account): __name__ = "FilejungleCom" __type__ = "account" - __version__ = "0.15" + __version__ = "0.16" __status__ = "testing" __description__ = """Filejungle.com account plugin""" @@ -25,7 +25,7 @@ class FilejungleCom(Account): LOGIN_FAILED_PATTERN = r'' - def grab_info(self, user, password, data, req): + def grab_info(self, user, password, data): html = self.load(self.URL + "dashboard.php") m = re.search(self.TRAFFIC_LEFT_PATTERN, html) if m: @@ -38,7 +38,7 @@ class FilejungleCom(Account): return {'premium': premium, 'trafficleft': -1, 'validuntil': validuntil} - def login(self, user, password, data, req): + def signin(self, user, password, data): html = self.load(urlparse.urljoin(self.URL, "login.php"), post={'loginUserName' : user, 'loginUserPassword' : password, diff --git a/module/plugins/accounts/FileomCom.py b/module/plugins/accounts/FileomCom.py index 957f4ef05..0bd0b60cf 100644 --- a/module/plugins/accounts/FileomCom.py +++ b/module/plugins/accounts/FileomCom.py @@ -6,7 +6,7 @@ from module.plugins.internal.XFSAccount import XFSAccount class FileomCom(XFSAccount): __name__ = "FileomCom" __type__ = "account" - __version__ = "0.03" + __version__ = "0.04" __status__ = "testing" __description__ = """Fileom.com account plugin""" @@ -14,4 +14,4 @@ class FileomCom(XFSAccount): __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] - HOSTER_DOMAIN = "fileom.com" + PLUGIN_DOMAIN = "fileom.com" diff --git a/module/plugins/accounts/FilerNet.py b/module/plugins/accounts/FilerNet.py index 8cfc39ef5..96bdebd81 100644 --- a/module/plugins/accounts/FilerNet.py +++ b/module/plugins/accounts/FilerNet.py @@ -9,7 +9,7 @@ from module.plugins.internal.Account import Account class FilerNet(Account): __name__ = "FilerNet" __type__ = "account" - __version__ = "0.08" + __version__ = "0.09" __status__ = "testing" __description__ = """Filer.net account plugin""" @@ -23,7 +23,7 @@ class FilerNet(Account): FREE_PATTERN = r'Account Status\s*\s*Free' - def grab_info(self, user, password, data, req): + def grab_info(self, user, password, data): html = self.load("https://filer.net/profile") #: Free user @@ -43,7 +43,7 @@ class FilerNet(Account): return {'premium': False, 'validuntil': None, 'trafficleft': None} - def login(self, user, password, data, req): + def signin(self, user, password, data): html = self.load("https://filer.net/login") token = re.search(self.TOKEN_PATTERN, html).group(1) diff --git a/module/plugins/accounts/FilerioCom.py b/module/plugins/accounts/FilerioCom.py index 8a4750036..d843dd605 100644 --- a/module/plugins/accounts/FilerioCom.py +++ b/module/plugins/accounts/FilerioCom.py @@ -6,7 +6,7 @@ from module.plugins.internal.XFSAccount import XFSAccount class FilerioCom(XFSAccount): __name__ = "FilerioCom" __type__ = "account" - __version__ = "0.04" + __version__ = "0.05" __status__ = "testing" __description__ = """FileRio.in account plugin""" @@ -14,4 +14,4 @@ class FilerioCom(XFSAccount): __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - HOSTER_DOMAIN = "filerio.in" + PLUGIN_DOMAIN = "filerio.in" diff --git a/module/plugins/accounts/FilesMailRu.py b/module/plugins/accounts/FilesMailRu.py index cbbdd7528..551a7b8e5 100644 --- a/module/plugins/accounts/FilesMailRu.py +++ b/module/plugins/accounts/FilesMailRu.py @@ -6,7 +6,7 @@ from module.plugins.internal.Account import Account class FilesMailRu(Account): __name__ = "FilesMailRu" __type__ = "account" - __version__ = "0.14" + __version__ = "0.15" __status__ = "testing" __description__ = """Filesmail.ru account plugin""" @@ -14,11 +14,11 @@ class FilesMailRu(Account): __authors__ = [("RaNaN", "RaNaN@pyload.org")] - def grab_info(self, user, password, data, req): + def grab_info(self, user, password, data): return {'validuntil': None, 'trafficleft': None} - def login(self, user, password, data, req): + def signin(self, user, password, data): user, domain = user.split("@") html = self.load("https://swa.mail.ru/cgi-bin/auth", diff --git a/module/plugins/accounts/FileserveCom.py b/module/plugins/accounts/FileserveCom.py index 86401a486..bc56d4b96 100644 --- a/module/plugins/accounts/FileserveCom.py +++ b/module/plugins/accounts/FileserveCom.py @@ -9,7 +9,7 @@ from module.common.json_layer import json_loads class FileserveCom(Account): __name__ = "FileserveCom" __type__ = "account" - __version__ = "0.23" + __version__ = "0.24" __status__ = "testing" __description__ = """Fileserve.com account plugin""" @@ -17,9 +17,7 @@ class FileserveCom(Account): __authors__ = [("mkaay", "mkaay@mkaay.de")] - def grab_info(self, user, password, data, req): - data = self.get_data(user) - + def grab_info(self, user, password, data): html = self.load("http://app.fileserve.com/api/login/", post={'username': user, 'password': password, @@ -33,7 +31,7 @@ class FileserveCom(Account): return {'premium': False, 'trafficleft': None, 'validuntil': None} - def login(self, user, password, data, req): + def signin(self, user, password, data): html = self.load("http://app.fileserve.com/api/login/", post={'username': user, 'password': password, diff --git a/module/plugins/accounts/FourSharedCom.py b/module/plugins/accounts/FourSharedCom.py index 913de1a55..05e75f326 100644 --- a/module/plugins/accounts/FourSharedCom.py +++ b/module/plugins/accounts/FourSharedCom.py @@ -7,7 +7,7 @@ from module.plugins.internal.Plugin import set_cookie class FourSharedCom(Account): __name__ = "FourSharedCom" __type__ = "account" - __version__ = "0.08" + __version__ = "0.09" __status__ = "testing" __description__ = """FourShared.com account plugin""" @@ -16,13 +16,13 @@ class FourSharedCom(Account): ("stickell", "l.stickell@yahoo.it")] - def grab_info(self, user, password, data, req): + def grab_info(self, user, password, data): #: Free mode only for now return {'premium': False} - def login(self, user, password, data, req): - set_cookie(req.cj, "4shared.com", "4langcookie", "en") + def signin(self, user, password, data): + set_cookie(self.req.cj, "4shared.com", "4langcookie", "en") res = self.load("https://www.4shared.com/web/login", post={'login' : user, diff --git a/module/plugins/accounts/FreakshareCom.py b/module/plugins/accounts/FreakshareCom.py index f02741ed2..42551b732 100644 --- a/module/plugins/accounts/FreakshareCom.py +++ b/module/plugins/accounts/FreakshareCom.py @@ -9,7 +9,7 @@ from module.plugins.internal.Account import Account class FreakshareCom(Account): __name__ = "FreakshareCom" __type__ = "account" - __version__ = "0.16" + __version__ = "0.17" __status__ = "testing" __description__ = """Freakshare.com account plugin""" @@ -17,7 +17,7 @@ class FreakshareCom(Account): __authors__ = [("RaNaN", "RaNaN@pyload.org")] - def grab_info(self, user, password, data, req): + def grab_info(self, user, password, data): premium = False validuntil = None trafficleft = None @@ -41,7 +41,7 @@ class FreakshareCom(Account): return {'premium': premium, 'validuntil': validuntil, 'trafficleft': trafficleft} - def login(self, user, password, data, req): + def signin(self, user, password, data): self.load("http://freakshare.com/index.php?language=EN") html = self.load("https://freakshare.com/login.html", diff --git a/module/plugins/accounts/FreeWayMe.py b/module/plugins/accounts/FreeWayMe.py index 0cf80348a..dc8027b3c 100644 --- a/module/plugins/accounts/FreeWayMe.py +++ b/module/plugins/accounts/FreeWayMe.py @@ -7,7 +7,7 @@ from module.common.json_layer import json_loads class FreeWayMe(Account): __name__ = "FreeWayMe" __type__ = "account" - __version__ = "0.17" + __version__ = "0.18" __status__ = "testing" __description__ = """FreeWayMe account plugin""" @@ -15,8 +15,16 @@ class FreeWayMe(Account): __authors__ = [("Nicolas Giese", "james@free-way.me")] - def grab_info(self, user, password, data, req): - status = self.get_account_status(user, password, req) + def grab_hosters(self, user, password, data): + hostis = self.load("http://www.free-way.bz/ajax/jd.php", + get={'id' : 3, + 'user': user, + 'pass': password}).replace("\"", "") #@TODO: Revert to `https` in 0.4.10 + return [x.strip() for x in hostis.split(",") if x.strip()] + + + def grab_info(self, user, password, data): + status = self.get_account_status(user, password) self.log_debug(status) @@ -33,15 +41,15 @@ class FreeWayMe(Account): return account_info - def login(self, user, password, data, req): - status = self.get_account_status(user, password, req) + def signin(self, user, password, data): + status = self.get_account_status(user, password) #: Check if user and password are valid if not status: self.fail_login() - def get_account_status(self, user, password, req): + def get_account_status(self, user, password): answer = self.load("http://www.free-way.bz/ajax/jd.php", #@TODO: Revert to `https` in 0.4.10 get={'id': 4, 'user': user, 'pass': password}) diff --git a/module/plugins/accounts/FshareVn.py b/module/plugins/accounts/FshareVn.py index 3bd6d9d7f..4e078ccc9 100644 --- a/module/plugins/accounts/FshareVn.py +++ b/module/plugins/accounts/FshareVn.py @@ -9,7 +9,7 @@ from module.plugins.internal.Account import Account class FshareVn(Account): __name__ = "FshareVn" __type__ = "account" - __version__ = "0.12" + __version__ = "0.13" __status__ = "testing" __description__ = """Fshare.vn account plugin""" @@ -24,7 +24,7 @@ class FshareVn(Account): DIRECT_DOWNLOAD_PATTERN = ur']*)[^>]*/>Kích hoạt download trực tiếp' - def grab_info(self, user, password, data, req): + def grab_info(self, user, password, data): html = self.load("http://www.fshare.vn/account_info.php") if re.search(self.LIFETIME_PATTERN, html): @@ -45,7 +45,7 @@ class FshareVn(Account): return {'validuntil': validuntil, 'trafficleft': trafficleft, 'premium': premium} - def login(self, user, password, data, req): + def signin(self, user, password, data): html = self.load("https://www.fshare.vn/login.php", post={'LoginForm[email]' : user, 'LoginForm[password]' : password, diff --git a/module/plugins/accounts/Ftp.py b/module/plugins/accounts/Ftp.py index 2d35ab7bb..d73b557ef 100644 --- a/module/plugins/accounts/Ftp.py +++ b/module/plugins/accounts/Ftp.py @@ -6,7 +6,7 @@ from module.plugins.internal.Account import Account class Ftp(Account): __name__ = "Ftp" __type__ = "account" - __version__ = "0.03" + __version__ = "0.04" __status__ = "testing" __description__ = """Ftp dummy account plugin""" diff --git a/module/plugins/accounts/HellshareCz.py b/module/plugins/accounts/HellshareCz.py index 7dbc828a0..3031c26b6 100644 --- a/module/plugins/accounts/HellshareCz.py +++ b/module/plugins/accounts/HellshareCz.py @@ -9,7 +9,7 @@ from module.plugins.internal.Account import Account class HellshareCz(Account): __name__ = "HellshareCz" __type__ = "account" - __version__ = "0.19" + __version__ = "0.20" __status__ = "testing" __description__ = """Hellshare.cz account plugin""" @@ -20,7 +20,7 @@ class HellshareCz(Account): CREDIT_LEFT_PATTERN = r'