summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-07-17 03:03:26 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-07-17 03:03:26 +0200
commitd2e2b127651a5a44b56337eb6d9ca246c97a208a (patch)
tree46f34e2102fd44ed2f719727eb07a445e7baa77d /module/plugins/hoster
parentNo camelCase style anymore (diff)
downloadpyload-d2e2b127651a5a44b56337eb6d9ca246c97a208a.tar.xz
Spare fixes and code cosmetics
Diffstat (limited to 'module/plugins/hoster')
-rw-r--r--module/plugins/hoster/BasePlugin.py4
-rw-r--r--module/plugins/hoster/BezvadataCz.py2
-rw-r--r--module/plugins/hoster/CloudzillaTo.py2
-rw-r--r--module/plugins/hoster/FastixRu.py2
-rw-r--r--module/plugins/hoster/FilecloudIo.py2
-rw-r--r--module/plugins/hoster/FileserveCom.py2
-rw-r--r--module/plugins/hoster/FreeWayMe.py4
-rw-r--r--module/plugins/hoster/Ftp.py4
-rw-r--r--module/plugins/hoster/LetitbitNet.py2
-rw-r--r--module/plugins/hoster/LinksnappyCom.py2
-rw-r--r--module/plugins/hoster/MegaDebridEu.py2
-rw-r--r--module/plugins/hoster/MegaRapidoNet.py2
-rw-r--r--module/plugins/hoster/MyfastfileCom.py2
-rw-r--r--module/plugins/hoster/NoPremiumPl.py2
-rw-r--r--module/plugins/hoster/OboomCom.py2
-rw-r--r--module/plugins/hoster/OverLoadMe.py2
-rw-r--r--module/plugins/hoster/PremiumizeMe.py2
-rw-r--r--module/plugins/hoster/RPNetBiz.py2
-rw-r--r--module/plugins/hoster/RapideoPl.py2
-rw-r--r--module/plugins/hoster/RapidgatorNet.py2
-rw-r--r--module/plugins/hoster/RehostTo.py2
-rw-r--r--module/plugins/hoster/ShareonlineBiz.py2
-rw-r--r--module/plugins/hoster/SmoozedCom.py2
-rw-r--r--module/plugins/hoster/UlozTo.py2
-rw-r--r--module/plugins/hoster/UploadheroCom.py2
-rw-r--r--module/plugins/hoster/WebshareCz.py2
-rw-r--r--module/plugins/hoster/XFileSharingPro.py8
27 files changed, 33 insertions, 33 deletions
diff --git a/module/plugins/hoster/BasePlugin.py b/module/plugins/hoster/BasePlugin.py
index 7fc0426ea..909b350c9 100644
--- a/module/plugins/hoster/BasePlugin.py
+++ b/module/plugins/hoster/BasePlugin.py
@@ -66,12 +66,12 @@ class BasePlugin(Hoster):
self.log_debug("Auth required", "Received HTTP status code: %d" % e.code)
account = self.core.accountManager.getAccountPlugin('Http')
- servers = [x['login'] for x in account.getAllAccounts()]
+ servers = [x['login'] for x in account.get_all_accounts()]
server = urlparse.urlparse(pyfile.url).netloc
if server in servers:
self.log_debug("Logging on to %s" % server)
- self.req.addAuth(account.getAccountData(server)['password'])
+ self.req.addAuth(account.get_account_data(server)['password'])
else:
pwd = self.get_password()
if ':' in pwd:
diff --git a/module/plugins/hoster/BezvadataCz.py b/module/plugins/hoster/BezvadataCz.py
index f0514b817..91d7e68b8 100644
--- a/module/plugins/hoster/BezvadataCz.py
+++ b/module/plugins/hoster/BezvadataCz.py
@@ -85,7 +85,7 @@ class BezvadataCz(SimpleHoster):
elif '<div class="infobox' in self.html:
self.temp_offline()
else:
- return super(BezvadataCz, self).checkErrors()
+ return super(BezvadataCz, self).check_errors()
def loadcaptcha(self, data, *args, **kwargs):
diff --git a/module/plugins/hoster/CloudzillaTo.py b/module/plugins/hoster/CloudzillaTo.py
index f58a0aa61..f93fe0bc9 100644
--- a/module/plugins/hoster/CloudzillaTo.py
+++ b/module/plugins/hoster/CloudzillaTo.py
@@ -35,7 +35,7 @@ class CloudzillaTo(SimpleHoster):
if re.search(self.PASSWORD_PATTERN, self.html):
self.retry(reason="Wrong password")
else:
- return super(CloudzillaTo, self).checkErrors()
+ return super(CloudzillaTo, self).check_errors()
def handle_free(self, pyfile):
diff --git a/module/plugins/hoster/FastixRu.py b/module/plugins/hoster/FastixRu.py
index 4e6b2e236..f7971e3ac 100644
--- a/module/plugins/hoster/FastixRu.py
+++ b/module/plugins/hoster/FastixRu.py
@@ -26,7 +26,7 @@ class FastixRu(MultiHoster):
def handle_premium(self, pyfile):
- api_key = self.account.getAccountData(self.user)
+ api_key = self.account.get_account_data(self.user)
api_key = api_key['api']
self.html = self.load("http://fastix.ru/api_v2/",
diff --git a/module/plugins/hoster/FilecloudIo.py b/module/plugins/hoster/FilecloudIo.py
index d9013630d..f92d82269 100644
--- a/module/plugins/hoster/FilecloudIo.py
+++ b/module/plugins/hoster/FilecloudIo.py
@@ -110,7 +110,7 @@ class FilecloudIo(SimpleHoster):
def handle_premium(self, pyfile):
- akey = self.account.getAccountData(self.user)['akey']
+ akey = self.account.get_account_data(self.user)['akey']
ukey = self.info['pattern']['ID']
self.log_debug("Akey: %s | Ukey: %s" % (akey, ukey))
rep = self.load("http://api.filecloud.io/api-fetch_download_url.api",
diff --git a/module/plugins/hoster/FileserveCom.py b/module/plugins/hoster/FileserveCom.py
index 8ba963588..5a792a425 100644
--- a/module/plugins/hoster/FileserveCom.py
+++ b/module/plugins/hoster/FileserveCom.py
@@ -189,7 +189,7 @@ class FileserveCom(Hoster):
# try api download
res = self.load("http://app.fileserve.com/api/download/premium/",
post={"username": self.user,
- "password": self.account.getAccountData(self.user)['password'],
+ "password": self.account.get_account_data(self.user)['password'],
"shorten": self.file_id})
if res:
res = json_loads(res)
diff --git a/module/plugins/hoster/FreeWayMe.py b/module/plugins/hoster/FreeWayMe.py
index 3750e6069..0f264dd49 100644
--- a/module/plugins/hoster/FreeWayMe.py
+++ b/module/plugins/hoster/FreeWayMe.py
@@ -24,7 +24,7 @@ class FreeWayMe(MultiHoster):
def handle_premium(self, pyfile):
- user, data = self.account.selectAccount()
+ user, data = self.account.select_account()
for _i in xrange(5):
#: try it five times
@@ -32,7 +32,7 @@ class FreeWayMe(MultiHoster):
get={'multiget': 7,
'url' : pyfile.url,
'user' : user,
- 'pw' : self.account.getAccountData(user)['password'],
+ 'pw' : self.account.get_account_data(user)['password'],
'json' : ""},
just_header=True)
diff --git a/module/plugins/hoster/Ftp.py b/module/plugins/hoster/Ftp.py
index 8c269b255..2accf9883 100644
--- a/module/plugins/hoster/Ftp.py
+++ b/module/plugins/hoster/Ftp.py
@@ -38,11 +38,11 @@ class Ftp(Hoster):
pass
if not "@" in netloc:
- servers = [x['login'] for x in self.account.getAllAccounts()] if self.account else []
+ servers = [x['login'] for x in self.account.get_all_accounts()] if self.account else []
if netloc in servers:
self.log_debug("Logging on to %s" % netloc)
- self.req.addAuth(self.account.getAccountInfo(netloc)['password'])
+ self.req.addAuth(self.account.get_account_info(netloc)['password'])
else:
pwd = self.get_password()
if ':' in pwd:
diff --git a/module/plugins/hoster/LetitbitNet.py b/module/plugins/hoster/LetitbitNet.py
index 60634354b..15a46066a 100644
--- a/module/plugins/hoster/LetitbitNet.py
+++ b/module/plugins/hoster/LetitbitNet.py
@@ -123,7 +123,7 @@ class LetitbitNet(SimpleHoster):
def handle_premium(self, pyfile):
api_key = self.user
- premium_key = self.account.getAccountData(self.user)['password']
+ premium_key = self.account.get_account_data(self.user)['password']
json_data = [api_key, ["download/direct_links", {"pass": premium_key, "link": pyfile.url}]]
api_rep = self.load('http://api.letitbit.net/json', post={'r': json_dumps(json_data)})
diff --git a/module/plugins/hoster/LinksnappyCom.py b/module/plugins/hoster/LinksnappyCom.py
index 19cad7b97..0aec4c959 100644
--- a/module/plugins/hoster/LinksnappyCom.py
+++ b/module/plugins/hoster/LinksnappyCom.py
@@ -29,7 +29,7 @@ class LinksnappyCom(MultiHoster):
json_params = json_dumps({'link' : pyfile.url,
'type' : host,
'username': self.user,
- 'password': self.account.getAccountData(self.user)['password']})
+ 'password': self.account.get_account_data(self.user)['password']})
r = self.load("http://gen.linksnappy.com/genAPI.php",
post={'genLinks': json_params})
diff --git a/module/plugins/hoster/MegaDebridEu.py b/module/plugins/hoster/MegaDebridEu.py
index 67c8f087b..79c289da5 100644
--- a/module/plugins/hoster/MegaDebridEu.py
+++ b/module/plugins/hoster/MegaDebridEu.py
@@ -29,7 +29,7 @@ class MegaDebridEu(MultiHoster):
Connexion to the mega-debrid API
Return True if succeed
"""
- user, data = self.account.selectAccount()
+ user, data = self.account.select_account()
jsonResponse = self.load(self.API_URL,
get={'action': 'connectUser', 'login': user, 'password': data['password']})
res = json_loads(jsonResponse)
diff --git a/module/plugins/hoster/MegaRapidoNet.py b/module/plugins/hoster/MegaRapidoNet.py
index cc5be0ea3..5fa38d05d 100644
--- a/module/plugins/hoster/MegaRapidoNet.py
+++ b/module/plugins/hoster/MegaRapidoNet.py
@@ -46,7 +46,7 @@ class MegaRapidoNet(MultiHoster):
'links' : pyfile.url,
'exibir' : "normal",
'usar' : "premium",
- 'user' : self.account.getAccountInfo(self.user).get('sid', None),
+ 'user' : self.account.get_account_info(self.user).get('sid', None),
'autoreset': ""})
if "desloga e loga novamente para gerar seus links" in self.html.lower():
diff --git a/module/plugins/hoster/MyfastfileCom.py b/module/plugins/hoster/MyfastfileCom.py
index f68bfab18..506042aee 100644
--- a/module/plugins/hoster/MyfastfileCom.py
+++ b/module/plugins/hoster/MyfastfileCom.py
@@ -26,7 +26,7 @@ class MyfastfileCom(MultiHoster):
def handle_premium(self, pyfile):
self.html = self.load('http://myfastfile.com/api.php',
- get={'user': self.user, 'pass': self.account.getAccountData(self.user)['password'],
+ get={'user': self.user, 'pass': self.account.get_account_data(self.user)['password'],
'link': pyfile.url})
self.log_debug("JSON data: " + self.html)
diff --git a/module/plugins/hoster/NoPremiumPl.py b/module/plugins/hoster/NoPremiumPl.py
index 9e935cd08..65170ca10 100644
--- a/module/plugins/hoster/NoPremiumPl.py
+++ b/module/plugins/hoster/NoPremiumPl.py
@@ -38,7 +38,7 @@ class NoPremiumPl(MultiHoster):
def prepare(self):
super(NoPremiumPl, self).prepare()
- data = self.account.getAccountData(self.user)
+ data = self.account.get_account_data(self.user)
self.usr = data['usr']
self.pwd = data['pwd']
diff --git a/module/plugins/hoster/OboomCom.py b/module/plugins/hoster/OboomCom.py
index fb42243c5..190b04814 100644
--- a/module/plugins/hoster/OboomCom.py
+++ b/module/plugins/hoster/OboomCom.py
@@ -57,7 +57,7 @@ class OboomCom(Hoster):
def get_session_token(self):
if self.premium:
- accountInfo = self.account.getAccountInfo(self.user, True)
+ accountInfo = self.account.get_account_info(self.user, True)
if "session" in accountInfo:
self.session_token = accountInfo['session']
else:
diff --git a/module/plugins/hoster/OverLoadMe.py b/module/plugins/hoster/OverLoadMe.py
index ab0440a2e..1d2650887 100644
--- a/module/plugins/hoster/OverLoadMe.py
+++ b/module/plugins/hoster/OverLoadMe.py
@@ -27,7 +27,7 @@ class OverLoadMe(MultiHoster):
def handle_premium(self, pyfile):
- data = self.account.getAccountData(self.user)
+ data = self.account.get_account_data(self.user)
page = self.load("https://api.over-load.me/getdownload.php",
get={'auth': data['password'],
'link': pyfile.url})
diff --git a/module/plugins/hoster/PremiumizeMe.py b/module/plugins/hoster/PremiumizeMe.py
index e87742839..f02cc4c66 100644
--- a/module/plugins/hoster/PremiumizeMe.py
+++ b/module/plugins/hoster/PremiumizeMe.py
@@ -30,7 +30,7 @@ class PremiumizeMe(MultiHoster):
pyfile.name = ".".join(temp)
#: Get account data
- user, data = self.account.selectAccount()
+ user, data = self.account.select_account()
#: Get rewritten link using the premiumize.me api v1 (see https://secure.premiumize.me/?show=api)
data = json_loads(self.load("http://api.premiumize.me/pm-api/v1.php", #@TODO: Revert to `https` in 0.4.10
diff --git a/module/plugins/hoster/RPNetBiz.py b/module/plugins/hoster/RPNetBiz.py
index a548e1670..d151ce5e7 100644
--- a/module/plugins/hoster/RPNetBiz.py
+++ b/module/plugins/hoster/RPNetBiz.py
@@ -25,7 +25,7 @@ class RPNetBiz(MultiHoster):
def handle_premium(self, pyfile):
- user, data = self.account.selectAccount()
+ user, data = self.account.select_account()
#: Get the download link
res = self.load("https://premium.rpnet.biz/client_api.php",
diff --git a/module/plugins/hoster/RapideoPl.py b/module/plugins/hoster/RapideoPl.py
index a9a0b354a..9b893f7a3 100644
--- a/module/plugins/hoster/RapideoPl.py
+++ b/module/plugins/hoster/RapideoPl.py
@@ -38,7 +38,7 @@ class RapideoPl(MultiHoster):
def prepare(self):
super(RapideoPl, self).prepare()
- data = self.account.getAccountData(self.user)
+ data = self.account.get_account_data(self.user)
self.usr = data['usr']
self.pwd = data['pwd']
diff --git a/module/plugins/hoster/RapidgatorNet.py b/module/plugins/hoster/RapidgatorNet.py
index b2962af10..f8b319a54 100644
--- a/module/plugins/hoster/RapidgatorNet.py
+++ b/module/plugins/hoster/RapidgatorNet.py
@@ -50,7 +50,7 @@ class RapidgatorNet(SimpleHoster):
def setup(self):
if self.account:
- self.sid = self.account.getAccountInfo(self.user).get('sid', None)
+ self.sid = self.account.get_account_info(self.user).get('sid', None)
else:
self.sid = None
diff --git a/module/plugins/hoster/RehostTo.py b/module/plugins/hoster/RehostTo.py
index f3a011067..a4830afe4 100644
--- a/module/plugins/hoster/RehostTo.py
+++ b/module/plugins/hoster/RehostTo.py
@@ -22,7 +22,7 @@ class RehostTo(MultiHoster):
def handle_premium(self, pyfile):
self.download("http://rehost.to/process_download.php",
get={'user': "cookie",
- 'pass': self.account.getAccountInfo(self.user)['session'],
+ 'pass': self.account.get_account_info(self.user)['session'],
'dl' : pyfile.url},
disposition=True)
diff --git a/module/plugins/hoster/ShareonlineBiz.py b/module/plugins/hoster/ShareonlineBiz.py
index 2134ec7e6..413c796bb 100644
--- a/module/plugins/hoster/ShareonlineBiz.py
+++ b/module/plugins/hoster/ShareonlineBiz.py
@@ -123,7 +123,7 @@ class ShareonlineBiz(SimpleHoster):
def handle_premium(self, pyfile): #: should be working better loading (account) api internally
html = self.load("http://api.share-online.biz/account.php",
get={'username': self.user,
- 'password': self.account.getAccountData(self.user)['password'],
+ 'password': self.account.get_account_data(self.user)['password'],
'act' : "download",
'lid' : self.info['fileid']})
diff --git a/module/plugins/hoster/SmoozedCom.py b/module/plugins/hoster/SmoozedCom.py
index 31b5dd4d7..c278881f8 100644
--- a/module/plugins/hoster/SmoozedCom.py
+++ b/module/plugins/hoster/SmoozedCom.py
@@ -35,7 +35,7 @@ class SmoozedCom(MultiHoster):
pyfile.name = ".".join(temp)
#: Check the link
- get_data = {'session_key': self.account.getAccountInfo(self.user)['session'],
+ get_data = {'session_key': self.account.get_account_info(self.user)['session'],
'url' : pyfile.url}
data = json_loads(self.load("http://www2.smoozed.com/api/check", get=get_data))
diff --git a/module/plugins/hoster/UlozTo.py b/module/plugins/hoster/UlozTo.py
index f60549813..85f20d406 100644
--- a/module/plugins/hoster/UlozTo.py
+++ b/module/plugins/hoster/UlozTo.py
@@ -116,7 +116,7 @@ class UlozTo(SimpleHoster):
if re.search(self.VIPLINK_PATTERN, self.html):
self.html = self.load(pyfile.url, get={'disclaimer': "1"})
- return super(UlozTo, self).checkErrors()
+ return super(UlozTo, self).check_errors()
def check_file(self):
diff --git a/module/plugins/hoster/UploadheroCom.py b/module/plugins/hoster/UploadheroCom.py
index 2ae7356c5..de83b42fc 100644
--- a/module/plugins/hoster/UploadheroCom.py
+++ b/module/plugins/hoster/UploadheroCom.py
@@ -64,7 +64,7 @@ class UploadheroCom(SimpleHoster):
self.wait(wait_time, True)
self.retry()
- return super(UploadheroCom, self).checkErrors()
+ return super(UploadheroCom, self).check_errors()
getInfo = create_getInfo(UploadheroCom)
diff --git a/module/plugins/hoster/WebshareCz.py b/module/plugins/hoster/WebshareCz.py
index 2afe7421a..b650e9219 100644
--- a/module/plugins/hoster/WebshareCz.py
+++ b/module/plugins/hoster/WebshareCz.py
@@ -40,7 +40,7 @@ class WebshareCz(SimpleHoster):
def handle_free(self, pyfile):
- wst = self.account.getAccountData(self.user).get('wst', None) if self.account else None
+ wst = self.account.get_account_data(self.user).get('wst', None) if self.account else None
api_data = getURL("https://webshare.cz/api/file_link/",
post={'ident': self.info['pattern']['ID'], 'wst': wst})
diff --git a/module/plugins/hoster/XFileSharingPro.py b/module/plugins/hoster/XFileSharingPro.py
index 860fd5309..2cbd42906 100644
--- a/module/plugins/hoster/XFileSharingPro.py
+++ b/module/plugins/hoster/XFileSharingPro.py
@@ -34,7 +34,7 @@ class XFileSharingPro(XFSHoster):
account = self.core.accountManager.getAccountPlugin(self.HOSTER_NAME)
- if account and account.canUse():
+ if account and account.can_use():
self.account = account
elif self.account:
@@ -43,9 +43,9 @@ class XFileSharingPro(XFSHoster):
else:
return
- self.user, data = self.account.selectAccount()
- self.req = self.account.getAccountRequest(self.user)
- self.premium = self.account.isPremium(self.user)
+ self.user, data = self.account.select_account()
+ self.req = self.account.get_account_request(self.user)
+ self.premium = self.account.is_premium(self.user)
def setup(self):