summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-12-26 04:27:41 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-12-26 04:27:41 +0100
commit136f63dc39603814b215606f888fb2e639021277 (patch)
tree1f81247c40e63af189533e36ff1429b854d15b15
parent[AlldebridCom] Fix checkFile (diff)
downloadpyload-136f63dc39603814b215606f888fb2e639021277.tar.xz
Spare code fixes
-rw-r--r--module/plugins/accounts/ShareonlineBiz.py6
-rw-r--r--module/plugins/hoster/RealdebridCom.py6
-rw-r--r--module/plugins/hoster/UnrestrictLi.py5
-rw-r--r--module/plugins/internal/SimpleCrypter.py10
-rw-r--r--module/plugins/internal/XFSHoster.py14
5 files changed, 22 insertions, 19 deletions
diff --git a/module/plugins/accounts/ShareonlineBiz.py b/module/plugins/accounts/ShareonlineBiz.py
index 596be9b7c..49afa12b8 100644
--- a/module/plugins/accounts/ShareonlineBiz.py
+++ b/module/plugins/accounts/ShareonlineBiz.py
@@ -16,7 +16,7 @@ class ShareonlineBiz(Account):
def getUserAPI(self, user, req):
return req.load("http://api.share-online.biz/account.php",
- {"username": user, "password": self.accounts[user]['password'], "act": "userDetails"})
+ get={"username": user, "password": self.accounts[user]['password'], 'act': "userDetails"})
def loadAccountInfo(self, user, req):
@@ -34,9 +34,9 @@ class ShareonlineBiz(Account):
if "a" in info and info['a'].lower() != "not_available":
req.cj.setCookie("share-online.biz", "a", info['a'])
- return {"validuntil": float(info['expire_date']) if "expire_date" in info else -1,
+ return {"validuntil" : float(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}
+ "premium" : True if ("dl" in info or "a" in info) and (info['group'] != "Sammler") else False}
def login(self, user, data, req):
diff --git a/module/plugins/hoster/RealdebridCom.py b/module/plugins/hoster/RealdebridCom.py
index 0de78226d..eb27a26f9 100644
--- a/module/plugins/hoster/RealdebridCom.py
+++ b/module/plugins/hoster/RealdebridCom.py
@@ -14,9 +14,9 @@ from module.utils import parseFileSize
class RealdebridCom(MultiHoster):
__name__ = "RealdebridCom"
__type__ = "hoster"
- __version__ = "0.58"
+ __version__ = "0.59"
- __pattern__ = r'https?://(?:[^/]*\.)?real-debrid\..*'
+ __pattern__ = r'https?://(?:[^/]+\.)?real-debrid\..*'
__description__ = """Real-Debrid.com hoster plugin"""
__license__ = "GPLv3"
@@ -41,7 +41,7 @@ class RealdebridCom(MultiHoster):
def handlePremium(self):
data = json_loads(self.load("https://real-debrid.com/ajax/unrestrict.php",
get={'lang' : "en",
- 'link' : quote(self.pyfile.url, ""),
+ 'link' : self.pyfile.url,
'password': self.getPassword(),
'time' : int(time() * 1000)}))
diff --git a/module/plugins/hoster/UnrestrictLi.py b/module/plugins/hoster/UnrestrictLi.py
index 7535d7b41..1476efa96 100644
--- a/module/plugins/hoster/UnrestrictLi.py
+++ b/module/plugins/hoster/UnrestrictLi.py
@@ -29,7 +29,7 @@ def secondsToMidnight(gmt=0):
class UnrestrictLi(MultiHoster):
__name__ = "UnrestrictLi"
__type__ = "hoster"
- __version__ = "0.17"
+ __version__ = "0.18"
__pattern__ = r'https?://(?:[^/]*\.)?(unrestrict|unr)\.li'
@@ -38,6 +38,9 @@ class UnrestrictLi(MultiHoster):
__authors__ = [("stickell", "l.stickell@yahoo.it")]
+ LOGIN_ACCOUNT = False
+
+
def setup(self):
self.chunkLimit = 16
self.resumeDownload = True
diff --git a/module/plugins/internal/SimpleCrypter.py b/module/plugins/internal/SimpleCrypter.py
index e0dd10585..6596828b3 100644
--- a/module/plugins/internal/SimpleCrypter.py
+++ b/module/plugins/internal/SimpleCrypter.py
@@ -12,7 +12,7 @@ from module.utils import fixup
class SimpleCrypter(Crypter, SimpleHoster):
__name__ = "SimpleCrypter"
__type__ = "crypter"
- __version__ = "0.33"
+ __version__ = "0.34"
__pattern__ = r'^unmatchable$'
__config__ = [("use_subfolder", "bool", "Save package to subfolder", True), #: Overrides core.config['general']['folder_per_package']
@@ -82,14 +82,14 @@ class SimpleCrypter(Crypter, SimpleHoster):
def prepare(self):
- if self.LOGIN_ACCOUNT and not self.account:
- self.fail(_("Required account not found"))
+ self.info = {}
+ self.links = [] #@TODO: Move to hoster class in 0.4.10
if self.LOGIN_PREMIUM and not self.premium:
self.fail(_("Required premium account not found"))
- self.info = {}
- self.links = []
+ if self.LOGIN_ACCOUNT and not self.account:
+ self.fail(_("Required account not found"))
self.req.setOption("timeout", 120)
diff --git a/module/plugins/internal/XFSHoster.py b/module/plugins/internal/XFSHoster.py
index dd2dd2527..7c6ae5725 100644
--- a/module/plugins/internal/XFSHoster.py
+++ b/module/plugins/internal/XFSHoster.py
@@ -16,7 +16,7 @@ from module.utils import html_unescape
class XFSHoster(SimpleHoster):
__name__ = "XFSHoster"
__type__ = "hoster"
- __version__ = "0.31"
+ __version__ = "0.32"
__pattern__ = r'^unmatchable$'
@@ -32,7 +32,7 @@ class XFSHoster(SimpleHoster):
TEXT_ENCODING = False
COOKIES = [(HOSTER_DOMAIN, "lang", "english")]
- CHECK_DIRECT_LINK = None
+ DIRECT_LINK = None
MULTI_HOSTER = True #@NOTE: Should be default to False for safe, but I'm lazy...
NAME_PATTERN = r'(Filename[ ]*:[ ]*</b>(</td><td nowrap>)?|name="fname"[ ]+value="|<[\w^_]+ class="(file)?name">)\s*(?P<N>.+?)(\s*<|")'
@@ -45,7 +45,7 @@ class XFSHoster(SimpleHoster):
PREMIUM_ONLY_PATTERN = r'>This file is available for Premium Users only'
ERROR_PATTERN = r'(?:class=["\']err["\'].*?>|<[Cc]enter><b>|>Error</td>|>\(ERROR:)(?:\s*<.+?>\s*)*(.+?)(?:["\']|<|\))'
- LEECH_LINK_PATTERN = r'<h2>Download Link</h2>\s*<textarea[^>]*>([^<]+)'
+ LINK_LEECH_PATTERN = r'<h2>Download Link</h2>\s*<textarea[^>]*>([^<]+)'
LINK_PATTERN = None #: final download url pattern
CAPTCHA_PATTERN = r'(https?://[^"\']+?/captchas?/[^"\']+)'
@@ -58,7 +58,7 @@ class XFSHoster(SimpleHoster):
def setup(self):
- self.chunkLimit = 1
+ self.chunkLimit = 1
self.resumeDownload = self.multiDL = self.premium
@@ -80,7 +80,7 @@ class XFSHoster(SimpleHoster):
super(XFSHoster, self).prepare()
- if self.CHECK_DIRECT_LINK is None:
+ if self.DIRECT_LINK is None:
self.directDL = bool(self.premium)
@@ -189,9 +189,9 @@ class XFSHoster(SimpleHoster):
self.fail(stmsg)
#get easybytez.com link for uploaded file
- m = re.search(self.LEECH_LINK_PATTERN, self.html)
+ m = re.search(self.LINK_LEECH_PATTERN, self.html)
if m is None:
- self.error(_("LEECH_LINK_PATTERN not found"))
+ self.error(_("LINK_LEECH_PATTERN not found"))
header = self.load(m.group(1), just_header=True, decode=True)