summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-12-07 00:27:18 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-12-07 00:27:18 +0100
commit67587fbe0335cacfde28a86ba729b9d567ce1da7 (patch)
tree090ea3a41894437ce619fe06304508479ace6ab6 /module
parentPlugin code cosmetics (2) (diff)
downloadpyload-67587fbe0335cacfde28a86ba729b9d567ce1da7.tar.xz
Plugin code cosmetics (3)
Diffstat (limited to 'module')
-rw-r--r--module/plugins/accounts/AlldebridCom.py4
-rw-r--r--module/plugins/accounts/FastixRu.py11
-rwxr-xr-xmodule/plugins/accounts/NetloadIn.py2
-rw-r--r--module/plugins/accounts/PremiumTo.py4
-rw-r--r--module/plugins/accounts/PremiumizeMe.py7
-rw-r--r--module/plugins/accounts/RehostTo.py9
-rw-r--r--module/plugins/crypter/MediafireComFolder.py6
-rw-r--r--module/plugins/hooks/AlldebridCom.py2
-rw-r--r--module/plugins/hooks/EasybytezCom.py17
-rw-r--r--module/plugins/hooks/FastixRu.py5
-rw-r--r--module/plugins/hooks/FreeWayMe.py2
-rw-r--r--module/plugins/hooks/LinksnappyCom.py2
-rw-r--r--module/plugins/hooks/MegaDebridEu.py2
-rw-r--r--module/plugins/hooks/MyfastfileCom.py2
-rw-r--r--module/plugins/hooks/OverLoadMe.py3
-rw-r--r--module/plugins/hooks/PremiumizeMe.py4
-rw-r--r--module/plugins/hooks/RPNetBiz.py2
-rw-r--r--module/plugins/hooks/RehostTo.py3
-rw-r--r--module/plugins/hooks/SimplyPremiumCom.py2
-rw-r--r--module/plugins/hooks/SimplydebridCom.py2
-rw-r--r--module/plugins/hooks/UnrestrictLi.py2
-rw-r--r--module/plugins/hooks/ZeveraCom.py2
-rw-r--r--module/plugins/hoster/AlldebridCom.py8
-rw-r--r--module/plugins/hoster/BezvadataCz.py3
-rw-r--r--module/plugins/hoster/BitshareCom.py2
-rw-r--r--module/plugins/hoster/CatShareNet.py2
-rw-r--r--module/plugins/hoster/DataHu.py2
-rw-r--r--module/plugins/hoster/DlFreeFr.py15
-rw-r--r--module/plugins/hoster/FastixRu.py7
-rw-r--r--module/plugins/hoster/FileStoreTo.py3
-rw-r--r--module/plugins/hoster/FilecloudIo.py5
-rw-r--r--module/plugins/hoster/FileserveCom.py4
-rw-r--r--module/plugins/hoster/FreeWayMe.py4
-rw-r--r--module/plugins/hoster/GamefrontCom.py5
-rw-r--r--module/plugins/hoster/GooIm.py3
-rw-r--r--module/plugins/hoster/JumbofilesCom.py3
-rw-r--r--module/plugins/hoster/KingfilesNet.py2
-rw-r--r--module/plugins/hoster/MegasharesCom.py19
-rw-r--r--module/plugins/hoster/NetloadIn.py11
-rw-r--r--module/plugins/hoster/NowDownloadSx.py5
-rw-r--r--module/plugins/hoster/NowVideoSx.py2
-rw-r--r--module/plugins/hoster/OneFichierCom.py2
-rw-r--r--module/plugins/hoster/PremiumTo.py8
-rw-r--r--module/plugins/hoster/PremiumizeMe.py9
-rw-r--r--module/plugins/hoster/RapidgatorNet.py2
-rw-r--r--module/plugins/hoster/RapidshareCom.py2
-rw-r--r--module/plugins/hoster/RealdebridCom.py9
-rw-r--r--module/plugins/hoster/RehostTo.py5
-rw-r--r--module/plugins/hoster/SimplyPremiumCom.py2
-rw-r--r--module/plugins/hoster/SimplydebridCom.py7
-rw-r--r--module/plugins/hoster/StreamCz.py2
-rw-r--r--module/plugins/hoster/TwoSharedCom.py3
-rw-r--r--module/plugins/hoster/UlozTo.py2
-rw-r--r--module/plugins/hoster/UnrestrictLi.py2
-rw-r--r--module/plugins/hoster/UploadedTo.py2
-rw-r--r--module/plugins/hoster/VeohCom.py5
-rw-r--r--module/plugins/hoster/VimeoCom.py5
-rw-r--r--module/plugins/hoster/YoutubeCom.py3
-rw-r--r--module/plugins/hoster/ZeveraCom.py5
59 files changed, 157 insertions, 118 deletions
diff --git a/module/plugins/accounts/AlldebridCom.py b/module/plugins/accounts/AlldebridCom.py
index 344b54e4f..1fb5e4b54 100644
--- a/module/plugins/accounts/AlldebridCom.py
+++ b/module/plugins/accounts/AlldebridCom.py
@@ -36,8 +36,8 @@ class AlldebridCom(Account):
#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']))
+ page = req.load("http://www.alldebrid.com/api.php",
+ get={'action': "info_user", 'login': user, 'pw': data['password']})
self.logDebug(page)
xml = dom.parseString(page)
exp_time = time() + int(xml.getElementsByTagName("date")[0].childNodes[0].nodeValue) * 24 * 60 * 60
diff --git a/module/plugins/accounts/FastixRu.py b/module/plugins/accounts/FastixRu.py
index 049ee9f77..ced49125a 100644
--- a/module/plugins/accounts/FastixRu.py
+++ b/module/plugins/accounts/FastixRu.py
@@ -16,11 +16,11 @@ class FastixRu(Account):
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)
+ page = json_loads(req.load("http://fastix.ru/api_v2/", get={'apikey': data['api'], 'sub': "getaccountdetails"}))
+
points = page['points']
- kb = float(points)
- kb = kb * 1024 ** 2 / 1000
+ kb = float(points) * 1024 ** 2 / 1000
+
if points > 0:
account_info = {"validuntil": -1, "trafficleft": kb}
else:
@@ -29,7 +29,8 @@ class FastixRu(Account):
def login(self, user, data, req):
- page = req.load("http://fastix.ru/api_v2/?sub=get_apikey&email=%s&password=%s" % (user, data['password']))
+ page = req.load("http://fastix.ru/api_v2/",
+ get={'sub': "get_apikey", 'email': user, 'password': data['password']})
api = json_loads(page)
api = api['apikey']
data['api'] = api
diff --git a/module/plugins/accounts/NetloadIn.py b/module/plugins/accounts/NetloadIn.py
index be0b8632c..6565e6899 100755
--- a/module/plugins/accounts/NetloadIn.py
+++ b/module/plugins/accounts/NetloadIn.py
@@ -18,7 +18,7 @@ class NetloadIn(Account):
def loadAccountInfo(self, user, req):
- page = req.load("http://netload.in/index.php?id=2&lang=de")
+ page = req.load("http://netload.in/index.php", get={'id': 2, 'lang': "de"})
left = r'>(\d+) (Tag|Tage), (\d+) Stunden<'
left = re.search(left, page)
if left:
diff --git a/module/plugins/accounts/PremiumTo.py b/module/plugins/accounts/PremiumTo.py
index 44bce1c7c..c1a8c661a 100644
--- a/module/plugins/accounts/PremiumTo.py
+++ b/module/plugins/accounts/PremiumTo.py
@@ -26,8 +26,8 @@ class PremiumTo(Account):
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()
+ authcode = req.load("http://premium.to/api/getauthcode.php",
+ get={'username': user, 'password': self.password}).strip()
if "wrong username" in authcode:
self.wrongPassword()
diff --git a/module/plugins/accounts/PremiumizeMe.py b/module/plugins/accounts/PremiumizeMe.py
index 951c340e1..6603165e0 100644
--- a/module/plugins/accounts/PremiumizeMe.py
+++ b/module/plugins/accounts/PremiumizeMe.py
@@ -42,7 +42,8 @@ class PremiumizeMe(Account):
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&params[login]=%s&params[pass]=%s" % (
- user, self.accounts[user]['password']))
+ answer = req.load("https://api.premiumize.me/pm-api/v1.php",
+ get={'method' : "accountstatus",
+ 'params[login]': user,
+ 'params[pass]' : self.accounts[user]['password']})
return json_loads(answer)
diff --git a/module/plugins/accounts/RehostTo.py b/module/plugins/accounts/RehostTo.py
index 8046f84c0..16702e632 100644
--- a/module/plugins/accounts/RehostTo.py
+++ b/module/plugins/accounts/RehostTo.py
@@ -15,12 +15,14 @@ class RehostTo(Account):
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']))
+ page = req.load("http://rehost.to/api.php",
+ get={'cmd': "login", 'user': user, 'pass': 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)
+ page = req.load("http://rehost.to/api.php",
+ get={'cmd': "get_premium_credits", 'long_ses': long_ses})
traffic, valid = page.split(",")
account_info = {"trafficleft": int(traffic) * 1024,
@@ -32,7 +34,8 @@ class RehostTo(Account):
def login(self, user, data, req):
- page = req.load("http://rehost.to/api.php?cmd=login&user=%s&pass=%s" % (user, data['password']))
+ page = req.load("http://rehost.to/api.php",
+ get={'cmd': "login", 'user': user, 'pass': data['password']})
if "Login failed." in page:
self.wrongPassword()
diff --git a/module/plugins/crypter/MediafireComFolder.py b/module/plugins/crypter/MediafireComFolder.py
index c83de4715..d1dc89518 100644
--- a/module/plugins/crypter/MediafireComFolder.py
+++ b/module/plugins/crypter/MediafireComFolder.py
@@ -42,8 +42,10 @@ class MediafireComFolder(Crypter):
folder_key = m.group(1)
self.logDebug("FOLDER KEY: %s" % folder_key)
- json_resp = json_loads(self.load(
- "http://www.mediafire.com/api/folder/get_info.php?folder_key=%s&response_format=json&version=1" % folder_key))
+ json_resp = json_loads(self.load("http://www.mediafire.com/api/folder/get_info.php",
+ get={'folder_key' : folder_key,
+ 'response_format': "json",
+ 'version' : 1}))
#self.logInfo(json_resp)
if json_resp['response']['result'] == "Success":
for link in json_resp['response']['folder_info']['files']:
diff --git a/module/plugins/hooks/AlldebridCom.py b/module/plugins/hooks/AlldebridCom.py
index c06607a28..2d3c8aad7 100644
--- a/module/plugins/hooks/AlldebridCom.py
+++ b/module/plugins/hooks/AlldebridCom.py
@@ -22,6 +22,6 @@ class AlldebridCom(MultiHoster):
def getHoster(self):
https = "https" if self.getConfig("https") else "http"
- page = getURL(https + "://www.alldebrid.com/api.php?action=get_host").replace("\"", "").strip()
+ page = getURL(https + "://www.alldebrid.com/api.php", get={'action': "get_host"}).replace("\"", "").strip()
return [x.strip() for x in page.split(",") if x.strip()]
diff --git a/module/plugins/hooks/EasybytezCom.py b/module/plugins/hooks/EasybytezCom.py
index 89deaed2b..3faa4fa1a 100644
--- a/module/plugins/hooks/EasybytezCom.py
+++ b/module/plugins/hooks/EasybytezCom.py
@@ -23,14 +23,17 @@ class EasybytezCom(MultiHoster):
user = self.account.selectAccount()[0]
try:
- req = self.account.getAccountRequest(user)
+ req = self.account.getAccountRequest(user)
page = req.load("http://www.easybytez.com")
- m = re.search(r'</textarea>\s*Supported sites:(.*)', page)
- return m.group(1).split(',')
+ hosters = re.search(r'</textarea>\s*Supported sites:(.*)', page).group(1).split(',')
+
except Exception, e:
- self.logDebug(e)
self.logWarning(_("Unable to load supported hoster list, using last known"))
- return ["bitshare.com", "crocko.com", "ddlstorage.com", "depositfiles.com", "extabit.com", "hotfile.com",
- "mediafire.com", "netload.in", "rapidgator.net", "rapidshare.com", "uploading.com", "uload.to",
- "uploaded.to"]
+ self.logDebug(e)
+
+ hosters = ["bitshare.com", "crocko.com", "ddlstorage.com", "depositfiles.com", "extabit.com", "hotfile.com",
+ "mediafire.com", "netload.in", "rapidgator.net", "rapidshare.com", "uploading.com", "uload.to",
+ "uploaded.to"]
+ finally:
+ return hosters
diff --git a/module/plugins/hooks/FastixRu.py b/module/plugins/hooks/FastixRu.py
index fe89a190c..cec6c6f1f 100644
--- a/module/plugins/hooks/FastixRu.py
+++ b/module/plugins/hooks/FastixRu.py
@@ -20,8 +20,9 @@ class FastixRu(MultiHoster):
def getHoster(self):
- page = getURL(
- "http://fastix.ru/api_v2/?apikey=5182964c3f8f9a7f0b00000a_kelmFB4n1IrnCDYuIFn2y&sub=allowed_sources")
+ page = getURL("http://fastix.ru/api_v2",
+ get={'apikey': "5182964c3f8f9a7f0b00000a_kelmFB4n1IrnCDYuIFn2y",
+ 'sub' : "allowed_sources"})
host_list = json_loads(page)
host_list = host_list['allow']
return host_list
diff --git a/module/plugins/hooks/FreeWayMe.py b/module/plugins/hooks/FreeWayMe.py
index 1d7dd369e..5abec29ba 100644
--- a/module/plugins/hooks/FreeWayMe.py
+++ b/module/plugins/hooks/FreeWayMe.py
@@ -20,6 +20,6 @@ class FreeWayMe(MultiHoster):
def getHoster(self):
- hostis = getURL("https://www.free-way.me/ajax/jd.php", get={"id": 3}).replace("\"", "").strip()
+ hostis = getURL("https://www.free-way.me/ajax/jd.php", get={'id': 3}).replace("\"", "").strip()
self.logDebug("Hosters", hostis)
return [x.strip() for x in hostis.split(",") if x.strip()]
diff --git a/module/plugins/hooks/LinksnappyCom.py b/module/plugins/hooks/LinksnappyCom.py
index aa130f416..82edc30fd 100644
--- a/module/plugins/hooks/LinksnappyCom.py
+++ b/module/plugins/hooks/LinksnappyCom.py
@@ -21,7 +21,7 @@ class LinksnappyCom(MultiHoster):
def getHoster(self):
- json_data = getURL('http://gen.linksnappy.com/lseAPI.php?act=FILEHOSTS')
+ json_data = getURL("http://gen.linksnappy.com/lseAPI.php", get={'act': "FILEHOSTS"})
json_data = json_loads(json_data)
return json_data['return'].keys()
diff --git a/module/plugins/hooks/MegaDebridEu.py b/module/plugins/hooks/MegaDebridEu.py
index d8e338aec..4f627b7e9 100644
--- a/module/plugins/hooks/MegaDebridEu.py
+++ b/module/plugins/hooks/MegaDebridEu.py
@@ -18,7 +18,7 @@ class MegaDebridEu(MultiHoster):
def getHoster(self):
- reponse = getURL('http://www.mega-debrid.eu/api.php?action=getHosters')
+ reponse = getURL("http://www.mega-debrid.eu/api.php", get={'action': "getHosters"})
json_data = json_loads(reponse)
if json_data['response_code'] == "ok":
diff --git a/module/plugins/hooks/MyfastfileCom.py b/module/plugins/hooks/MyfastfileCom.py
index 07731f1c2..0cf2c6c22 100644
--- a/module/plugins/hooks/MyfastfileCom.py
+++ b/module/plugins/hooks/MyfastfileCom.py
@@ -21,7 +21,7 @@ class MyfastfileCom(MultiHoster):
def getHoster(self):
- json_data = getURL('http://myfastfile.com/api.php?hosts', decode=True)
+ json_data = getURL("http://myfastfile.com/api.php", get={'hosts': ""}, decode=True)
self.logDebug("JSON data", json_data)
json_data = json_loads(json_data)
diff --git a/module/plugins/hooks/OverLoadMe.py b/module/plugins/hooks/OverLoadMe.py
index f4cbdd7fe..baa9b0e0a 100644
--- a/module/plugins/hooks/OverLoadMe.py
+++ b/module/plugins/hooks/OverLoadMe.py
@@ -23,8 +23,7 @@ class OverLoadMe(MultiHoster):
def getHoster(self):
https = "https" if self.getConfig("https") else "http"
page = getURL(https + "://api.over-load.me/hoster.php",
- get={"auth": "0001-cb1f24dadb3aa487bda5afd3b76298935329be7700cd7-5329be77-00cf-1ca0135f"}
- ).replace("\"", "").strip()
+ get={'auth': "0001-cb1f24dadb3aa487bda5afd3b76298935329be7700cd7-5329be77-00cf-1ca0135f"}).replace("\"", "").strip()
self.logDebug("Hosterlist", page)
return [x.strip() for x in page.split(",") if x.strip()]
diff --git a/module/plugins/hooks/PremiumizeMe.py b/module/plugins/hooks/PremiumizeMe.py
index ec21fbcb4..c18e8cf8e 100644
--- a/module/plugins/hooks/PremiumizeMe.py
+++ b/module/plugins/hooks/PremiumizeMe.py
@@ -30,8 +30,8 @@ class PremiumizeMe(MultiHoster):
# Get supported hosters list from premiumize.me using the
# json API v1 (see https://secure.premiumize.me/?show=api)
- answer = getURL("https://api.premiumize.me/pm-api/v1.php?method=hosterlist&params[login]=%s&params[pass]=%s" % (
- user, data['password']))
+ answer = getURL("https://api.premiumize.me/pm-api/v1.php"
+ get={'method': "hosterlist", 'params[login]': user, 'params[pass]': data['password']})
data = json_loads(answer)
# If account is not valid thera are no hosters available
diff --git a/module/plugins/hooks/RPNetBiz.py b/module/plugins/hooks/RPNetBiz.py
index 01591354d..e38aa8ea0 100644
--- a/module/plugins/hooks/RPNetBiz.py
+++ b/module/plugins/hooks/RPNetBiz.py
@@ -29,7 +29,7 @@ class RPNetBiz(MultiHoster):
(user, data) = self.account.selectAccount()
res = getURL("https://premium.rpnet.biz/client_api.php",
- get={"username": user, "password": data['password'], "action": "showHosterList"})
+ get={'username': user, 'password': data['password'], 'action': "showHosterList"})
hoster_list = json_loads(res)
# If account is not valid thera are no hosters available
diff --git a/module/plugins/hooks/RehostTo.py b/module/plugins/hooks/RehostTo.py
index c58abf3f3..1bf7d2555 100644
--- a/module/plugins/hooks/RehostTo.py
+++ b/module/plugins/hooks/RehostTo.py
@@ -20,7 +20,8 @@ class RehostTo(MultiHoster):
def getHoster(self):
- page = getURL("http://rehost.to/api.php?cmd=get_supported_och_dl&long_ses=%s" % self.long_ses)
+ page = getURL("http://rehost.to/api.php",
+ get={'cmd': "get_supported_och_dl", 'long_ses': self.long_ses})
return [x.strip() for x in page.replace("\"", "").split(",")]
diff --git a/module/plugins/hooks/SimplyPremiumCom.py b/module/plugins/hooks/SimplyPremiumCom.py
index ba0543691..cc7e9183c 100644
--- a/module/plugins/hooks/SimplyPremiumCom.py
+++ b/module/plugins/hooks/SimplyPremiumCom.py
@@ -22,7 +22,7 @@ class SimplyPremiumCom(MultiHoster):
def getHoster(self):
- json_data = getURL('http://www.simply-premium.com/api/hosts.php?format=json&online=1')
+ json_data = getURL("http://www.simply-premium.com/api/hosts.php", get={'format': "json", 'online': 1})
json_data = json_loads(json_data)
host_list = [element['regex'] for element in json_data['result']]
diff --git a/module/plugins/hooks/SimplydebridCom.py b/module/plugins/hooks/SimplydebridCom.py
index 3fbc0459c..173206e75 100644
--- a/module/plugins/hooks/SimplydebridCom.py
+++ b/module/plugins/hooks/SimplydebridCom.py
@@ -18,5 +18,5 @@ class SimplydebridCom(MultiHoster):
def getHoster(self):
- page = getURL("http://simply-debrid.com/api.php?list=1")
+ page = getURL("http://simply-debrid.com/api.php", get={'list': 1})
return [x.strip() for x in page.rstrip(';').replace("\"", "").split(";")]
diff --git a/module/plugins/hooks/UnrestrictLi.py b/module/plugins/hooks/UnrestrictLi.py
index 295cfaf5a..d87265ef4 100644
--- a/module/plugins/hooks/UnrestrictLi.py
+++ b/module/plugins/hooks/UnrestrictLi.py
@@ -22,7 +22,7 @@ class UnrestrictLi(MultiHoster):
def getHoster(self):
- json_data = getURL('http://unrestrict.li/api/jdownloader/hosts.php?format=json')
+ json_data = getURL("http://unrestrict.li/api/jdownloader/hosts.php", get={'format': "json"})
json_data = json_loads(json_data)
host_list = [element['host'] for element in json_data['result']]
diff --git a/module/plugins/hooks/ZeveraCom.py b/module/plugins/hooks/ZeveraCom.py
index 6ea05de4f..6fafb9666 100644
--- a/module/plugins/hooks/ZeveraCom.py
+++ b/module/plugins/hooks/ZeveraCom.py
@@ -18,5 +18,5 @@ class ZeveraCom(MultiHoster):
def getHoster(self):
- page = getURL("http://www.zevera.com/jDownloader.ashx?cmd=gethosters")
+ page = getURL("http://www.zevera.com/jDownloader.ashx", get={'cmd': "gethosters"})
return [x.strip() for x in page.replace("\"", "").split(",")]
diff --git a/module/plugins/hoster/AlldebridCom.py b/module/plugins/hoster/AlldebridCom.py
index c7240415d..bdd8ccdff 100644
--- a/module/plugins/hoster/AlldebridCom.py
+++ b/module/plugins/hoster/AlldebridCom.py
@@ -45,12 +45,10 @@ class AlldebridCom(Hoster):
self.fail(_("No AllDebrid account provided"))
else:
self.logDebug("Old URL: %s" % pyfile.url)
- password = self.getPassword().splitlines()
- password = "" if not password else password[0]
+ password = self.getPassword().splitlines()[0] or ""
- url = "http://www.alldebrid.com/service.php?link=%s&json=true&pw=%s" % (pyfile.url, password)
- page = self.load(url)
- data = json_loads(page)
+ data = json_loads(self.load("http://www.alldebrid.com/service.php",
+ get={'link': pyfile.url, 'json': "true", 'pw': password}))
self.logDebug("Json data", data)
diff --git a/module/plugins/hoster/BezvadataCz.py b/module/plugins/hoster/BezvadataCz.py
index d89616c86..3a0b8e58c 100644
--- a/module/plugins/hoster/BezvadataCz.py
+++ b/module/plugins/hoster/BezvadataCz.py
@@ -23,7 +23,8 @@ class BezvadataCz(SimpleHoster):
def setup(self):
- self.multiDL = self.resumeDownload = True
+ self.resumeDownload = True
+ self.multiDL = True
def handleFree(self):
diff --git a/module/plugins/hoster/BitshareCom.py b/module/plugins/hoster/BitshareCom.py
index da393f8fc..1483e5d1e 100644
--- a/module/plugins/hoster/BitshareCom.py
+++ b/module/plugins/hoster/BitshareCom.py
@@ -31,7 +31,7 @@ class BitshareCom(SimpleHoster):
def setup(self):
- self.multiDL = self.premium
+ self.multiDL = self.premium
self.chunkLimit = 1
diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py
index 63ae2c11c..0caac5913 100644
--- a/module/plugins/hoster/CatShareNet.py
+++ b/module/plugins/hoster/CatShareNet.py
@@ -31,7 +31,7 @@ class CatShareNet(SimpleHoster):
def setup(self):
- self.multiDL = self.premium
+ self.multiDL = self.premium
self.resumeDownload = True
diff --git a/module/plugins/hoster/DataHu.py b/module/plugins/hoster/DataHu.py
index 74d631e7b..437fea7cd 100644
--- a/module/plugins/hoster/DataHu.py
+++ b/module/plugins/hoster/DataHu.py
@@ -28,7 +28,7 @@ class DataHu(SimpleHoster):
def setup(self):
self.resumeDownload = True
- self.multiDL = self.premium
+ self.multiDL = self.premium
def handleFree(self):
diff --git a/module/plugins/hoster/DlFreeFr.py b/module/plugins/hoster/DlFreeFr.py
index 8bc883fea..f07d46768 100644
--- a/module/plugins/hoster/DlFreeFr.py
+++ b/module/plugins/hoster/DlFreeFr.py
@@ -59,10 +59,10 @@ class AdYouLike:
# "all":{"element_id":"ayl_private_cap_92300","lang":"fr","env":"prod"}}
ayl_data = json_loads(adyoulike_data_string)
- res = self.plugin.load(
- r'http://api-ayl.appspot.com/challenge?key=%(ayl_key)s&env=%(ayl_env)s&callback=%(callback)s' % {
- "ayl_key": ayl_data[self.engine]['key'], "ayl_env": ayl_data['all']['env'],
- "callback": self.ADYOULIKE_CALLBACK})
+ res = self.plugin.load("http://api-ayl.appspot.com/challenge",
+ get={'key' : ayl_data[self.engine]['key'],
+ 'env' : ayl_data['all']['env'],
+ 'callback': self.ADYOULIKE_CALLBACK})
m = re.search(self.ADYOULIKE_CHALLENGE_PATTERN, res)
challenge_string = None
@@ -130,9 +130,10 @@ class DlFreeFr(SimpleHoster):
def setup(self):
- self.multiDL = self.resumeDownload = True
- self.limitDL = 5
- self.chunkLimit = 1
+ self.resumeDownload = True
+ self.multiDL = True
+ self.limitDL = 5
+ self.chunkLimit = 1
def init(self):
diff --git a/module/plugins/hoster/FastixRu.py b/module/plugins/hoster/FastixRu.py
index 59b4bd24f..1e47638ea 100644
--- a/module/plugins/hoster/FastixRu.py
+++ b/module/plugins/hoster/FastixRu.py
@@ -46,10 +46,13 @@ class FastixRu(Hoster):
self.logDebug("Old URL: %s" % pyfile.url)
api_key = self.account.getAccountData(self.user)
api_key = api_key['api']
- url = "http://fastix.ru/api_v2/?apikey=%s&sub=getdirectlink&link=%s" % (api_key, pyfile.url)
- page = self.load(url)
+
+ page = self.load("http://fastix.ru/api_v2/",
+ get={'apikey': api_key, 'sub': "getdirectlink", 'link': pyfile.url})
data = json_loads(page)
+
self.logDebug("Json data", data)
+
if "error\":true" in page:
self.offline()
else:
diff --git a/module/plugins/hoster/FileStoreTo.py b/module/plugins/hoster/FileStoreTo.py
index 8e3ba7177..e1bd8da71 100644
--- a/module/plugins/hoster/FileStoreTo.py
+++ b/module/plugins/hoster/FileStoreTo.py
@@ -23,7 +23,8 @@ class FileStoreTo(SimpleHoster):
def setup(self):
- self.resumeDownload = self.multiDL = True
+ self.resumeDownload = True
+ self.multiDL = True
def handleFree(self):
diff --git a/module/plugins/hoster/FilecloudIo.py b/module/plugins/hoster/FilecloudIo.py
index 85ea3dae4..495f2268d 100644
--- a/module/plugins/hoster/FilecloudIo.py
+++ b/module/plugins/hoster/FilecloudIo.py
@@ -34,8 +34,9 @@ class FilecloudIo(SimpleHoster):
def setup(self):
- self.resumeDownload = self.multiDL = True
- self.chunkLimit = 1
+ self.resumeDownload = True
+ self.multiDL = True
+ self.chunkLimit = 1
def handleFree(self):
diff --git a/module/plugins/hoster/FileserveCom.py b/module/plugins/hoster/FileserveCom.py
index 2266e49b0..82d40fba6 100644
--- a/module/plugins/hoster/FileserveCom.py
+++ b/module/plugins/hoster/FileserveCom.py
@@ -59,9 +59,9 @@ class FileserveCom(Hoster):
def setup(self):
self.resumeDownload = self.multiDL = self.premium
-
self.file_id = re.match(self.__pattern__, self.pyfile.url).group('id')
- self.url = "%s%s" % (self.URLS[0], self.file_id)
+ self.url = "%s%s" % (self.URLS[0], self.file_id)
+
self.logDebug("File ID: %s URL: %s" % (self.file_id, self.url))
diff --git a/module/plugins/hoster/FreeWayMe.py b/module/plugins/hoster/FreeWayMe.py
index 84a56419b..a27dc04b8 100644
--- a/module/plugins/hoster/FreeWayMe.py
+++ b/module/plugins/hoster/FreeWayMe.py
@@ -17,8 +17,8 @@ class FreeWayMe(Hoster):
def setup(self):
self.resumeDownload = False
- self.chunkLimit = 1
- self.multiDL = self.premium
+ self.multiDL = self.premium
+ self.chunkLimit = 1
def process(self, pyfile):
diff --git a/module/plugins/hoster/GamefrontCom.py b/module/plugins/hoster/GamefrontCom.py
index 919d40891..c68866f87 100644
--- a/module/plugins/hoster/GamefrontCom.py
+++ b/module/plugins/hoster/GamefrontCom.py
@@ -25,8 +25,9 @@ class GamefrontCom(Hoster):
def setup(self):
- self.resumeDownload = self.multiDL = True
- self.chunkLimit = -1
+ self.resumeDownload = True
+ self.multiDL = True
+ self.chunkLimit = -1
def process(self, pyfile):
diff --git a/module/plugins/hoster/GooIm.py b/module/plugins/hoster/GooIm.py
index 854e348c8..436d825a9 100644
--- a/module/plugins/hoster/GooIm.py
+++ b/module/plugins/hoster/GooIm.py
@@ -25,7 +25,8 @@ class GooIm(SimpleHoster):
def setup(self):
- self.multiDL = self.resumeDownload = True
+ self.resumeDownload = True
+ self.multiDL = True
def handleFree(self):
diff --git a/module/plugins/hoster/JumbofilesCom.py b/module/plugins/hoster/JumbofilesCom.py
index d566ec0e2..2df639ac1 100644
--- a/module/plugins/hoster/JumbofilesCom.py
+++ b/module/plugins/hoster/JumbofilesCom.py
@@ -23,7 +23,8 @@ class JumbofilesCom(SimpleHoster):
def setup(self):
- self.resumeDownload = self.multiDL = True
+ self.resumeDownload = True
+ self.multiDL = True
def handleFree(self):
diff --git a/module/plugins/hoster/KingfilesNet.py b/module/plugins/hoster/KingfilesNet.py
index 202ab4a77..c84e3bb0f 100644
--- a/module/plugins/hoster/KingfilesNet.py
+++ b/module/plugins/hoster/KingfilesNet.py
@@ -30,8 +30,8 @@ class KingfilesNet(SimpleHoster):
def setup(self):
- self.multiDL = True
self.resumeDownload = True
+ self.multiDL = True
def handleFree(self):
diff --git a/module/plugins/hoster/MegasharesCom.py b/module/plugins/hoster/MegasharesCom.py
index 6b1472dd8..9d8441c6f 100644
--- a/module/plugins/hoster/MegasharesCom.py
+++ b/module/plugins/hoster/MegasharesCom.py
@@ -36,7 +36,7 @@ class MegasharesCom(SimpleHoster):
def setup(self):
self.resumeDownload = True
- self.multiDL = self.premium
+ self.multiDL = self.premium
def handlePremium(self):
@@ -55,15 +55,18 @@ class MegasharesCom(SimpleHoster):
for _i in xrange(5):
random_num = re.search(self.REACTIVATE_NUM_PATTERN, self.html).group(1)
- verifyinput = self.decryptCaptcha(
- "http://d01.megashares.com/index.php?secgfx=gfx&random_num=%s" % random_num)
+ verifyinput = self.decryptCaptcha("http://d01.megashares.com/index.php",
+ get={'secgfx': "gfx", 'random_num': random_num})
+
self.logInfo(_("Reactivating passport %s: %s %s") % (passport_num, random_num, verifyinput))
- url = ("http://d01.megashares.com%s&rs=check_passport_renewal" % request_uri +
- "&rsargs[]=%s&rsargs[]=%s&rsargs[]=%s" % (verifyinput, random_num, passport_num) +
- "&rsargs[]=replace_sec_pprenewal&rsrnd=%s" % str(int(time() * 1000)))
- self.logDebug(url)
- res = self.load(url)
+ res = self.load("http://d01.megashares.com%s" % request_uri,
+ get={'rs' : "check_passport_renewal",
+ 'rsargs[]': verifyinput,
+ 'rsargs[]': random_num,
+ 'rsargs[]': passport_num,
+ 'rsargs[]': "replace_sec_pprenewal",
+ 'rsrnd[]' : str(int(time() * 1000))})
if 'Thank you for reactivating your passport.' in res:
self.correctCaptcha()
diff --git a/module/plugins/hoster/NetloadIn.py b/module/plugins/hoster/NetloadIn.py
index b866b51c5..f5c5ee802 100644
--- a/module/plugins/hoster/NetloadIn.py
+++ b/module/plugins/hoster/NetloadIn.py
@@ -14,7 +14,7 @@ from module.plugins.internal.CaptchaService import ReCaptcha
def getInfo(urls):
## returns list of tupels (name, size (in bytes), status (see FileDatabase), url)
- apiurl = "http://api.netload.in/info.php?auth=Zf9SnQh9WiReEsb18akjvQGqT0I830e8&bz=1&md5=1&file_id="
+ apiurl = "http://api.netload.in/info.php"
id_regex = re.compile(NetloadIn.__pattern__)
urls_per_query = 80
@@ -25,7 +25,12 @@ def getInfo(urls):
if match:
ids = ids + match.group(1) + ";"
- api = getURL(apiurl + ids, decode=True)
+ api = getURL(apiurl,
+ get={'auth' : "Zf9SnQh9WiReEsb18akjvQGqT0I830e8",
+ 'bz' : 1,
+ 'md5' : 1,
+ 'file_id': ids},
+ decode=True)
if api is None or len(api) < 10:
self.logDebug("Prefetch failed")
@@ -91,7 +96,7 @@ class NetloadIn(Hoster):
if self.premium:
self.logDebug("Use Premium Account")
- settings = self.load("http://www.netload.in/index.php?id=2&lang=en")
+ settings = self.load("http://www.netload.in/index.php", get={'id': 2, 'lang': "en"})
if '<option value="2" selected="selected">Direkter Download' in settings:
self.logDebug("Using direct download")
diff --git a/module/plugins/hoster/NowDownloadSx.py b/module/plugins/hoster/NowDownloadSx.py
index 939b94260..d2ae08954 100644
--- a/module/plugins/hoster/NowDownloadSx.py
+++ b/module/plugins/hoster/NowDownloadSx.py
@@ -31,8 +31,9 @@ class NowDownloadSx(SimpleHoster):
def setup(self):
- self.multiDL = self.resumeDownload = True
- self.chunkLimit = -1
+ self.resumeDownload = True
+ self.multiDL = True
+ self.chunkLimit = -1
def handleFree(self):
diff --git a/module/plugins/hoster/NowVideoSx.py b/module/plugins/hoster/NowVideoSx.py
index 0623f49d6..b59bd79da 100644
--- a/module/plugins/hoster/NowVideoSx.py
+++ b/module/plugins/hoster/NowVideoSx.py
@@ -27,8 +27,8 @@ class NowVideoSx(SimpleHoster):
def setup(self):
- self.multiDL = True
self.resumeDownload = True
+ self.multiDL = True
def handleFree(self):
diff --git a/module/plugins/hoster/OneFichierCom.py b/module/plugins/hoster/OneFichierCom.py
index 977d45b6f..346317271 100644
--- a/module/plugins/hoster/OneFichierCom.py
+++ b/module/plugins/hoster/OneFichierCom.py
@@ -34,7 +34,7 @@ class OneFichierCom(SimpleHoster):
def setup(self):
- self.multiDL = self.premium
+ self.multiDL = self.premium
self.resumeDownload = True
diff --git a/module/plugins/hoster/PremiumTo.py b/module/plugins/hoster/PremiumTo.py
index b4fe327db..9f8037d41 100644
--- a/module/plugins/hoster/PremiumTo.py
+++ b/module/plugins/hoster/PremiumTo.py
@@ -41,9 +41,11 @@ class PremiumTo(Hoster):
#raise timeout to 2min
self.req.setOption("timeout", 120)
- self.download(
- "http://premium.to/api/getfile.php?username=%s&password=%s&link=%s" % (self.account.username, self.account.password, quote(pyfile.url, "")),
- disposition=True)
+ self.download("http://premium.to/api/getfile.php",
+ get={'username': self.account.username,
+ 'password': self.account.password,
+ 'link' : quote(pyfile.url, "")},
+ disposition=True)
check = self.checkDownload({"nopremium": "No premium account available"})
diff --git a/module/plugins/hoster/PremiumizeMe.py b/module/plugins/hoster/PremiumizeMe.py
index 70abdfcc2..bf00325d9 100644
--- a/module/plugins/hoster/PremiumizeMe.py
+++ b/module/plugins/hoster/PremiumizeMe.py
@@ -36,10 +36,11 @@ class PremiumizeMe(Hoster):
(user, data) = self.account.selectAccount()
# Get rewritten link using the premiumize.me api v1 (see https://secure.premiumize.me/?show=api)
- answer = self.load(
- "https://api.premiumize.me/pm-api/v1.php?method=directdownloadlink&params[login]=%s&params[pass]=%s&params[link]=%s" % (
- user, data['password'], pyfile.url))
- data = json_loads(answer)
+ data = json_loads(self.load("https://api.premiumize.me/pm-api/v1.php",
+ get={'method' : "directdownloadlink",
+ 'params[login]': user,
+ 'params[pass]' : data['password'],
+ 'params[link]' : pyfile.url}))
# Check status and decide what to do
status = data['status']
diff --git a/module/plugins/hoster/RapidgatorNet.py b/module/plugins/hoster/RapidgatorNet.py
index 6f3f7950a..7788616a8 100644
--- a/module/plugins/hoster/RapidgatorNet.py
+++ b/module/plugins/hoster/RapidgatorNet.py
@@ -55,7 +55,7 @@ class RapidgatorNet(SimpleHoster):
self.premium = True
self.resumeDownload = self.multiDL = self.premium
- self.chunkLimit = 1
+ self.chunkLimit = 1
def api_response(self, cmd):
diff --git a/module/plugins/hoster/RapidshareCom.py b/module/plugins/hoster/RapidshareCom.py
index 4ec5af67a..5ec837c58 100644
--- a/module/plugins/hoster/RapidshareCom.py
+++ b/module/plugins/hoster/RapidshareCom.py
@@ -65,7 +65,7 @@ class RapidshareCom(Hoster):
self.name = None
self.chunkLimit = -1 if self.premium else 1
- self.multiDL = self.resumeDownload = self.premium
+ self.multiDL = self.resumeDownload = self.premium
def process(self, pyfile):
diff --git a/module/plugins/hoster/RealdebridCom.py b/module/plugins/hoster/RealdebridCom.py
index db19a9217..cc6dd49c3 100644
--- a/module/plugins/hoster/RealdebridCom.py
+++ b/module/plugins/hoster/RealdebridCom.py
@@ -52,10 +52,11 @@ class RealdebridCom(Hoster):
else:
password = password[0]
- url = "https://real-debrid.com/ajax/unrestrict.php?lang=en&link=%s&password=%s&time=%s" % (
- quote(pyfile.url, ""), password, int(time() * 1000))
- page = self.load(url)
- data = json_loads(page)
+ data = json_loads(self.load("https://real-debrid.com/ajax/unrestrict.php",
+ get={'lang' : "en",
+ 'link' : quote(pyfile.url, ""),
+ 'password': password,
+ 'time' : int(time() * 1000)}))
self.logDebug("Returned Data: %s" % data)
diff --git a/module/plugins/hoster/RehostTo.py b/module/plugins/hoster/RehostTo.py
index 07755cb9c..7cde01025 100644
--- a/module/plugins/hoster/RehostTo.py
+++ b/module/plugins/hoster/RehostTo.py
@@ -35,9 +35,10 @@ class RehostTo(Hoster):
long_ses = data['long_ses']
self.logDebug("Rehost.to: Old URL: %s" % pyfile.url)
- new_url = "http://rehost.to/process_download.php?user=cookie&pass=%s&dl=%s" % (long_ses, quote(pyfile.url, ""))
#raise timeout to 2min
self.req.setOption("timeout", 120)
- self.download(new_url, disposition=True)
+ self.download("http://rehost.to/process_download.php",
+ get={'user': "cookie", 'pass': long_ses, 'dl': quote(pyfile.url, "")},
+ disposition=True)
diff --git a/module/plugins/hoster/SimplyPremiumCom.py b/module/plugins/hoster/SimplyPremiumCom.py
index 17330c5f9..bc37f45c8 100644
--- a/module/plugins/hoster/SimplyPremiumCom.py
+++ b/module/plugins/hoster/SimplyPremiumCom.py
@@ -34,7 +34,7 @@ class SimplyPremiumCom(Hoster):
else:
self.logDebug("Old URL: %s" % pyfile.url)
for i in xrange(5):
- page = self.load('http://www.simply-premium.com/premium.php?info&link=' + pyfile.url)
+ page = self.load("http://www.simply-premium.com/premium.php", get={'info': "", 'link': pyfile.url})
self.logDebug("JSON data: " + page)
if page != '':
break
diff --git a/module/plugins/hoster/SimplydebridCom.py b/module/plugins/hoster/SimplydebridCom.py
index ac7d7ef9a..3d4d3be93 100644
--- a/module/plugins/hoster/SimplydebridCom.py
+++ b/module/plugins/hoster/SimplydebridCom.py
@@ -18,8 +18,9 @@ class SimplydebridCom(Hoster):
def setup(self):
- self.resumeDownload = self.multiDL = True
- self.chunkLimit = 1
+ self.resumeDownload = True
+ self.multiDL = True
+ self.chunkLimit = 1
def process(self, pyfile):
@@ -46,7 +47,7 @@ class SimplydebridCom(Hoster):
self.logDebug("New URL: %s" % new_url)
if not re.match(self.__pattern__, new_url):
- page = self.load('http://simply-debrid.com/api.php', get={'dl': new_url}) # +'&u='+self.user+'&p='+self.account.getAccountData(self.user)['password'])
+ page = self.load("http://simply-debrid.com/api.php", get={'dl': new_url}) # +'&u='+self.user+'&p='+self.account.getAccountData(self.user)['password'])
if 'tiger Link' in page or 'Invalid Link' in page or ('API' in page and 'ERROR' in page):
self.fail(_("Unable to unrestrict link"))
new_url = page
diff --git a/module/plugins/hoster/StreamCz.py b/module/plugins/hoster/StreamCz.py
index 05f2bdee7..95d1e12ba 100644
--- a/module/plugins/hoster/StreamCz.py
+++ b/module/plugins/hoster/StreamCz.py
@@ -39,8 +39,8 @@ class StreamCz(Hoster):
def setup(self):
- self.multiDL = True
self.resumeDownload = True
+ self.multiDL = True
def process(self, pyfile):
diff --git a/module/plugins/hoster/TwoSharedCom.py b/module/plugins/hoster/TwoSharedCom.py
index 5fed652cb..59a8ce6e1 100644
--- a/module/plugins/hoster/TwoSharedCom.py
+++ b/module/plugins/hoster/TwoSharedCom.py
@@ -25,7 +25,8 @@ class TwoSharedCom(SimpleHoster):
def setup(self):
- self.resumeDownload = self.multiDL = True
+ self.resumeDownload = True
+ self.multiDL = True
def handleFree(self):
diff --git a/module/plugins/hoster/UlozTo.py b/module/plugins/hoster/UlozTo.py
index 294bd8e17..262b37c21 100644
--- a/module/plugins/hoster/UlozTo.py
+++ b/module/plugins/hoster/UlozTo.py
@@ -41,7 +41,7 @@ class UlozTo(SimpleHoster):
def setup(self):
- self.multiDL = self.premium
+ self.multiDL = self.premium
self.resumeDownload = True
diff --git a/module/plugins/hoster/UnrestrictLi.py b/module/plugins/hoster/UnrestrictLi.py
index adfa2eb1f..94ce1b845 100644
--- a/module/plugins/hoster/UnrestrictLi.py
+++ b/module/plugins/hoster/UnrestrictLi.py
@@ -80,7 +80,7 @@ class UnrestrictLi(Hoster):
self.download(new_url, disposition=True)
if self.getConfig("history"):
- self.load("https://unrestrict.li/history/&delete=all")
+ self.load("https://unrestrict.li/history/", get={'delete': "all"})
self.logInfo(_("Download history deleted"))
diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py
index 40fe768e9..7af6501eb 100644
--- a/module/plugins/hoster/UploadedTo.py
+++ b/module/plugins/hoster/UploadedTo.py
@@ -113,7 +113,7 @@ class UploadedTo(Hoster):
def setup(self):
- self.multiDL = self.resumeDownload = self.premium
+ self.multiDL = self.resumeDownload = self.premium
self.chunkLimit = 1 # critical problems with more chunks
self.fileID = getID(self.pyfile.url)
diff --git a/module/plugins/hoster/VeohCom.py b/module/plugins/hoster/VeohCom.py
index 8f434203d..6dbac397b 100644
--- a/module/plugins/hoster/VeohCom.py
+++ b/module/plugins/hoster/VeohCom.py
@@ -27,8 +27,9 @@ class VeohCom(SimpleHoster):
def setup(self):
- self.resumeDownload = self.multiDL = True
- self.chunkLimit = -1
+ self.resumeDownload = True
+ self.multiDL = True
+ self.chunkLimit = -1
def handleFree(self):
diff --git a/module/plugins/hoster/VimeoCom.py b/module/plugins/hoster/VimeoCom.py
index 025abf15e..9e4abf702 100644
--- a/module/plugins/hoster/VimeoCom.py
+++ b/module/plugins/hoster/VimeoCom.py
@@ -29,8 +29,9 @@ class VimeoCom(SimpleHoster):
def setup(self):
- self.resumeDownload = self.multiDL = True
- self.chunkLimit = -1
+ self.resumeDownload = True
+ self.multiDL = True
+ self.chunkLimit = -1
def handleFree(self):
diff --git a/module/plugins/hoster/YoutubeCom.py b/module/plugins/hoster/YoutubeCom.py
index 617a30867..bb0737440 100644
--- a/module/plugins/hoster/YoutubeCom.py
+++ b/module/plugins/hoster/YoutubeCom.py
@@ -84,7 +84,8 @@ class YoutubeCom(Hoster):
def setup(self):
- self.resumeDownload = self.multiDL = True
+ self.resumeDownload = True
+ self.multiDL = True
def process(self, pyfile):
diff --git a/module/plugins/hoster/ZeveraCom.py b/module/plugins/hoster/ZeveraCom.py
index 61470f903..fa2f6edb3 100644
--- a/module/plugins/hoster/ZeveraCom.py
+++ b/module/plugins/hoster/ZeveraCom.py
@@ -16,8 +16,9 @@ class ZeveraCom(Hoster):
def setup(self):
- self.resumeDownload = self.multiDL = True
- self.chunkLimit = 1
+ self.resumeDownload = True
+ self.multiDL = True
+ self.chunkLimit = 1
def process(self, pyfile):