summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
Diffstat (limited to 'module')
-rw-r--r--module/plugins/hoster/CzshareCom.py2
-rw-r--r--module/plugins/hoster/DailymotionCom.py3
-rw-r--r--module/plugins/hoster/DlFreeFr.py3
-rw-r--r--module/plugins/hoster/FileserveCom.py2
-rw-r--r--module/plugins/hoster/FileshareInUa.py3
-rw-r--r--module/plugins/hoster/FreevideoCz.py6
-rw-r--r--module/plugins/hoster/GamefrontCom.py3
-rw-r--r--module/plugins/hoster/HellshareCz.py2
-rw-r--r--module/plugins/hoster/HotfileCom.py3
-rw-r--r--module/plugins/hoster/IfolderRu.py2
-rw-r--r--module/plugins/hoster/JumbofilesCom.py3
-rw-r--r--module/plugins/hoster/MediafireCom.py6
-rw-r--r--module/plugins/hoster/MegasharesCom.py2
-rw-r--r--module/plugins/hoster/NetloadIn.py3
-rw-r--r--module/plugins/hoster/NowDownloadEu.py3
-rw-r--r--module/plugins/hoster/Premium4Me.py3
-rw-r--r--module/plugins/hoster/PutlockerCom.py3
-rw-r--r--module/plugins/hoster/RapidgatorNet.py3
-rw-r--r--module/plugins/hoster/Share76Com.py4
-rw-r--r--module/plugins/hoster/UploadedTo.py6
-rw-r--r--module/plugins/hoster/UptoboxCom.py4
-rw-r--r--module/plugins/hoster/X7To.py3
-rw-r--r--module/plugins/internal/SimpleHoster.py5
23 files changed, 31 insertions, 46 deletions
diff --git a/module/plugins/hoster/CzshareCom.py b/module/plugins/hoster/CzshareCom.py
index 8f6f76d84..fdfce6226 100644
--- a/module/plugins/hoster/CzshareCom.py
+++ b/module/plugins/hoster/CzshareCom.py
@@ -48,7 +48,7 @@ class CzshareCom(SimpleHoster):
USER_CREDIT_PATTERN = r'<div class="credit">\s*kredit: <strong>([0-9., ]+)([kKMG]i?B)</strong>\s*</div><!-- .credit -->'
def setup(self):
- self.multiDL = self.resumeDownload = True if self.premium else False
+ self.multiDL = self.resumeDownload = self.premium
self.chunkLimit = 1
def checkTrafficLeft(self):
diff --git a/module/plugins/hoster/DailymotionCom.py b/module/plugins/hoster/DailymotionCom.py
index ab8ff7910..7d33540f8 100644
--- a/module/plugins/hoster/DailymotionCom.py
+++ b/module/plugins/hoster/DailymotionCom.py
@@ -36,7 +36,8 @@ class DailymotionCom(Hoster):
for quality in ('hd720URL', 'hqURL', 'sdURL', 'ldURL', ''):
dlLink = self.getQuality(quality, allLinksInfo)
- if dlLink is not None: break
+ if dlLink is not None:
+ break
else:
self.fail(r'Unable to find video URL')
diff --git a/module/plugins/hoster/DlFreeFr.py b/module/plugins/hoster/DlFreeFr.py
index bb2dfa036..35b9ca6b8 100644
--- a/module/plugins/hoster/DlFreeFr.py
+++ b/module/plugins/hoster/DlFreeFr.py
@@ -119,9 +119,8 @@ class DlFreeFr(SimpleHoster):
#FILE_URL_PATTERN = r'href="(?P<url>http://.*?)">T&eacute;l&eacute;charger ce fichier'
def setup(self):
- self.multiDL = True
+ self.multiDL = self.resumeDownload = True
self.limitDL = 5
- self.resumeDownload = True
self.chunkLimit = 1
def init(self):
diff --git a/module/plugins/hoster/FileserveCom.py b/module/plugins/hoster/FileserveCom.py
index e8e78f9b0..a9ff24d19 100644
--- a/module/plugins/hoster/FileserveCom.py
+++ b/module/plugins/hoster/FileserveCom.py
@@ -65,7 +65,7 @@ class FileserveCom(Hoster):
# shares code with FilejungleCom and UploadstationCom
def setup(self):
- self.resumeDownload = self.multiDL = True if self.premium else False
+ self.resumeDownload = self.multiDL = self.premium
self.file_id = re.search(self.__pattern__, self.pyfile.url).group('id')
self.url = "%s%s" % (self.URLS[0], self.file_id)
diff --git a/module/plugins/hoster/FileshareInUa.py b/module/plugins/hoster/FileshareInUa.py
index d3724f728..11adc4e9c 100644
--- a/module/plugins/hoster/FileshareInUa.py
+++ b/module/plugins/hoster/FileshareInUa.py
@@ -19,8 +19,7 @@ class FileshareInUa(Hoster):
PATTERN_OFFLINE = "This file doesn't exist, or has been removed."
def setup(self):
- self.resumeDownload = True
- self.multiDL = True
+ self.resumeDownload = self.multiDL = True
def process(self, pyfile):
self.pyfile = pyfile
diff --git a/module/plugins/hoster/FreevideoCz.py b/module/plugins/hoster/FreevideoCz.py
index c5da074ed..3d8921c38 100644
--- a/module/plugins/hoster/FreevideoCz.py
+++ b/module/plugins/hoster/FreevideoCz.py
@@ -47,8 +47,7 @@ class FreevideoCz(Hoster):
FILE_OFFLINE_PATTERN = r'<h2 class="red-corner-full">Str.nka nebyla nalezena</h2>'
def setup(self):
- self.multiDL = True
- self.resumeDownload = True
+ self.multiDL = self.resumeDownload = True
def process(self, pyfile):
@@ -58,7 +57,8 @@ class FreevideoCz(Hoster):
self.offline()
found = re.search(self.URL_PATTERN, self.html)
- if found is None: self.fail("Parse error (URL)")
+ if found is None:
+ self.fail("Parse error (URL)")
download_url = found.group(1)
pyfile.name = re.search(self.__pattern__, pyfile.url).group(1) + ".mp4"
diff --git a/module/plugins/hoster/GamefrontCom.py b/module/plugins/hoster/GamefrontCom.py
index f77868b16..c82cfdf50 100644
--- a/module/plugins/hoster/GamefrontCom.py
+++ b/module/plugins/hoster/GamefrontCom.py
@@ -19,8 +19,7 @@ class GamefrontCom(Hoster):
PATTERN_OFFLINE = "This file doesn't exist, or has been removed."
def setup(self):
- self.resumeDownload = True
- self.multiDL = True
+ self.resumeDownload = self.multiDL = True
self.chunkLimit = -1
def process(self, pyfile):
diff --git a/module/plugins/hoster/HellshareCz.py b/module/plugins/hoster/HellshareCz.py
index 5fdcca7ae..8e39883e8 100644
--- a/module/plugins/hoster/HellshareCz.py
+++ b/module/plugins/hoster/HellshareCz.py
@@ -34,7 +34,7 @@ class HellshareCz(SimpleHoster):
SHOW_WINDOW_PATTERN = r'<a href="([^?]+/(\d+)/\?do=(fileDownloadButton|relatedFileDownloadButton-\2)-showDownloadWindow)"'
def setup(self):
- self.resumeDownload = self.multiDL = True if self.account else False
+ self.resumeDownload = self.multiDL = self.account
self.chunkLimit = 1
def process(self, pyfile):
diff --git a/module/plugins/hoster/HotfileCom.py b/module/plugins/hoster/HotfileCom.py
index df08419fa..6053ec1b6 100644
--- a/module/plugins/hoster/HotfileCom.py
+++ b/module/plugins/hoster/HotfileCom.py
@@ -49,8 +49,7 @@ class HotfileCom(Hoster):
self.url = None
if self.premium:
- self.multiDL = True
- self.resumeDownload = True
+ self.multiDL = self.resumeDownload = True
self.chunkLimit = -1
else:
self.multiDL = False
diff --git a/module/plugins/hoster/IfolderRu.py b/module/plugins/hoster/IfolderRu.py
index 14e568f8f..78f7e7cd5 100644
--- a/module/plugins/hoster/IfolderRu.py
+++ b/module/plugins/hoster/IfolderRu.py
@@ -41,7 +41,7 @@ class IfolderRu(SimpleHoster):
WRONG_CAPTCHA_PATTERN = ur'<font color=Red>неверный код,<br>введите еще раз</font><br>'
def setup(self):
- self.resumeDownload = self.multiDL = True if self.account else False
+ self.resumeDownload = self.multiDL = self.account
self.chunkLimit = 1
def process(self, pyfile):
diff --git a/module/plugins/hoster/JumbofilesCom.py b/module/plugins/hoster/JumbofilesCom.py
index 93885a6a3..1b8a2d73b 100644
--- a/module/plugins/hoster/JumbofilesCom.py
+++ b/module/plugins/hoster/JumbofilesCom.py
@@ -17,8 +17,7 @@ class JumbofilesCom(SimpleHoster):
DIRECT_LINK_PATTERN = '<meta http-equiv="refresh" content="10;url=(.+)">'
def setup(self):
- self.resumeDownload = True
- self.multiDL = True
+ self.resumeDownload = self.multiDL = True
def handleFree(self):
ukey = re.search(self.__pattern__, self.pyfile.url).group(1)
diff --git a/module/plugins/hoster/MediafireCom.py b/module/plugins/hoster/MediafireCom.py
index 1e856c41d..494d0049e 100644
--- a/module/plugins/hoster/MediafireCom.py
+++ b/module/plugins/hoster/MediafireCom.py
@@ -36,7 +36,8 @@ def checkHTMLHeader(url):
url = line.split(':', 1)[1].strip()
if 'error.php?errno=320' in url:
return url, 1
- if not url.startswith('http://'): url = 'http://www.mediafire.com' + url
+ if not url.startswith('http://'):
+ url = 'http://www.mediafire.com' + url
break
elif 'content-disposition' in line:
return url, 2
@@ -114,7 +115,8 @@ class MediafireCom(SimpleHoster):
self.fail("No or incorrect password")
found = re.search(r'kNO = "(http://.*?)";', self.html)
- if not found: self.parseError("Download URL")
+ if not found:
+ self.parseError("Download URL")
download_url = found.group(1)
self.logDebug("DOWNLOAD LINK:", download_url)
diff --git a/module/plugins/hoster/MegasharesCom.py b/module/plugins/hoster/MegasharesCom.py
index 7d089f717..4e43d4a00 100644
--- a/module/plugins/hoster/MegasharesCom.py
+++ b/module/plugins/hoster/MegasharesCom.py
@@ -43,7 +43,7 @@ class MegasharesCom(SimpleHoster):
def setup(self):
self.resumeDownload = True
- self.multiDL = True if self.premium else False
+ self.multiDL = self.premium
def handlePremium(self):
self.handleDownload(True)
diff --git a/module/plugins/hoster/NetloadIn.py b/module/plugins/hoster/NetloadIn.py
index 6a9ecaccc..ff72a3b63 100644
--- a/module/plugins/hoster/NetloadIn.py
+++ b/module/plugins/hoster/NetloadIn.py
@@ -61,9 +61,8 @@ class NetloadIn(Hoster):
def setup(self):
self.multiDL = False
if self.premium:
- self.multiDL = True
+ self.multiDL = self.resumeDownload = True
self.chunkLimit = -1
- self.resumeDownload = True
def process(self, pyfile):
self.url = pyfile.url
diff --git a/module/plugins/hoster/NowDownloadEu.py b/module/plugins/hoster/NowDownloadEu.py
index 4e4c32373..f1cace73b 100644
--- a/module/plugins/hoster/NowDownloadEu.py
+++ b/module/plugins/hoster/NowDownloadEu.py
@@ -39,9 +39,8 @@ class NowDownloadEu(SimpleHoster):
def setup(self):
self.wantReconnect = False
- self.multiDL = True
+ self.multiDL = self.resumeDownload = True
self.chunkLimit = -1
- self.resumeDownload = True
def handleFree(self):
tokenlink = re.search(self.FILE_TOKEN_PATTERN, self.html)
diff --git a/module/plugins/hoster/Premium4Me.py b/module/plugins/hoster/Premium4Me.py
index 9a359b9cb..d6c154693 100644
--- a/module/plugins/hoster/Premium4Me.py
+++ b/module/plugins/hoster/Premium4Me.py
@@ -60,7 +60,8 @@ class Premium4Me(Hoster):
trb = self.getTraffic()
self.logInfo("Filesize: %d, Traffic used %d, traffic left %d" % (pyfile.size, tra - trb, trb))
- if err: self.fail(err)
+ if err:
+ self.fail(err)
def getTraffic(self):
try:
diff --git a/module/plugins/hoster/PutlockerCom.py b/module/plugins/hoster/PutlockerCom.py
index 0f62ea96d..02205f9cc 100644
--- a/module/plugins/hoster/PutlockerCom.py
+++ b/module/plugins/hoster/PutlockerCom.py
@@ -37,9 +37,8 @@ class PutlockerCom(SimpleHoster):
FILE_INFO_PATTERN = r'site-content">\s*<h1>(?P<N>.+)<strong>\( (?P<S>[^)]+) \)</strong></h1>'
def handleFree(self):
- self.multiDL = True
+ self.multiDL = self.resumeDownload = True
self.chunkLimit = -1
- self.resumeDownload = True
self.pyfile.url = re.sub(r'http://putlocker\.com', r'http://www.putlocker.com', self.pyfile.url)
self.html = self.load(self.pyfile.url, decode=True)
diff --git a/module/plugins/hoster/RapidgatorNet.py b/module/plugins/hoster/RapidgatorNet.py
index 543d73966..64ed6a4b3 100644
--- a/module/plugins/hoster/RapidgatorNet.py
+++ b/module/plugins/hoster/RapidgatorNet.py
@@ -46,8 +46,7 @@ class RapidgatorNet(SimpleHoster):
SOLVEMEDIA_PATTERN = r'http:\/\/api\.solvemedia\.com\/papi\/challenge\.script\?k=(.*?)"'
def setup(self):
- self.resumeDownload = False
- self.multiDL = False
+ self.resumeDownload = self.multiDL = False
self.sid = None
self.chunkLimit = 1
self.req.setOption("timeout", 120)
diff --git a/module/plugins/hoster/Share76Com.py b/module/plugins/hoster/Share76Com.py
index aaa8cd950..b48780652 100644
--- a/module/plugins/hoster/Share76Com.py
+++ b/module/plugins/hoster/Share76Com.py
@@ -13,9 +13,5 @@ class Share76Com(XFileSharingPro):
FILE_INFO_PATTERN = r'<h2>\s*File:\s*<font[^>]*>(?P<N>[^>]+)</font>\s*\[<font[^>]*>(?P<S>[0-9.]+) (?P<U>[kKMG])i?B</font>\]</h2>'
HOSTER_NAME = "share76.com"
- def setup(self):
- self.resumeDownload = self.multiDL = self.premium
- self.chunkLimit = 1
-
getInfo = create_getInfo(Share76Com)
diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py
index 6ac3320c0..aee7f32b1 100644
--- a/module/plugins/hoster/UploadedTo.py
+++ b/module/plugins/hoster/UploadedTo.py
@@ -101,15 +101,13 @@ class UploadedTo(Hoster):
def setup(self):
self.html = None
- self.multiDL = False
- self.resumeDownload = False
+ self.multiDL = self.resumeDownload = False
self.url = False
self.chunkLimit = 1 # critical problems with more chunks
if self.account:
self.premium = self.account.getAccountInfo(self.user)["premium"]
if self.premium:
- self.multiDL = True
- self.resumeDownload = True
+ self.multiDL = self.resumeDownload = True
self.fileID = getID(self.pyfile.url)
self.pyfile.url = "http://uploaded.net/file/%s" % self.fileID
diff --git a/module/plugins/hoster/UptoboxCom.py b/module/plugins/hoster/UptoboxCom.py
index e0d4ce7f4..fe05bf916 100644
--- a/module/plugins/hoster/UptoboxCom.py
+++ b/module/plugins/hoster/UptoboxCom.py
@@ -15,9 +15,5 @@ class UptoboxCom(XFileSharingPro):
FILE_OFFLINE_PATTERN = r'<center>File Not Found</center>'
HOSTER_NAME = "uptobox.com"
- def setup(self):
- self.resumeDownload = self.multiDL = self.premium
- self.chunkLimit = 1
-
getInfo = create_getInfo(UptoboxCom)
diff --git a/module/plugins/hoster/X7To.py b/module/plugins/hoster/X7To.py
index 24d1643f3..1b8850d9d 100644
--- a/module/plugins/hoster/X7To.py
+++ b/module/plugins/hoster/X7To.py
@@ -21,8 +21,7 @@ class X7To(Hoster):
def init(self):
if self.premium:
- self.multiDL = False
- self.resumeDownload = False
+ self.multiDL = self.resumeDownload = False
self.chunkLimit = 1
else:
self.multiDL = False
diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py
index 69ed57ff8..67505f41a 100644
--- a/module/plugins/internal/SimpleHoster.py
+++ b/module/plugins/internal/SimpleHoster.py
@@ -173,8 +173,9 @@ class SimpleHoster(Hoster):
self.file_info = {}
def setup(self):
- self.resumeDownload = self.multiDL = True if self.premium else False
- if isinstance(self.SH_COOKIES, list): set_cookies(self.req.cj, self.SH_COOKIES)
+ self.resumeDownload = self.multiDL = self.premium
+ if isinstance(self.SH_COOKIES, list):
+ set_cookies(self.req.cj, self.SH_COOKIES)
def process(self, pyfile):
pyfile.url = replace_patterns(pyfile.url, self.FILE_URL_REPLACEMENTS)