summaryrefslogtreecommitdiffstats
path: root/module/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins')
-rw-r--r--module/plugins/crypter/NCryptIn.py2
-rw-r--r--module/plugins/crypter/RelinkUs.py6
-rw-r--r--module/plugins/crypter/ShareLinksBiz.py2
-rw-r--r--module/plugins/hoster/EuroshareEu.py2
-rw-r--r--module/plugins/hoster/FreakshareCom.py20
-rw-r--r--module/plugins/hoster/NetloadIn.py2
-rw-r--r--module/plugins/hoster/OverLoadMe.py2
-rw-r--r--module/plugins/hoster/PornhubCom.py2
-rw-r--r--module/plugins/hoster/RealdebridCom.py2
-rw-r--r--module/plugins/hoster/RedtubeCom.py2
-rw-r--r--module/plugins/hoster/ShareplaceCom.py2
-rw-r--r--module/plugins/hoster/XHamsterCom.py2
-rw-r--r--module/plugins/hoster/YoupornCom.py2
-rw-r--r--module/plugins/hoster/YourfilesTo.py2
-rw-r--r--module/plugins/internal/SimpleHoster.py2
15 files changed, 27 insertions, 25 deletions
diff --git a/module/plugins/crypter/NCryptIn.py b/module/plugins/crypter/NCryptIn.py
index 7de2c0df7..8ceb9d3c8 100644
--- a/module/plugins/crypter/NCryptIn.py
+++ b/module/plugins/crypter/NCryptIn.py
@@ -108,7 +108,7 @@ class NCryptIn(Crypter):
def isProtected(self):
form = re.search(r'<form.*?name.*?protected.*?>(.*?)</form>', self.cleanedHtml, re.S)
- if form is not None:
+ if form:
content = form.group(1)
for keyword in ("password", "captcha"):
if keyword in content:
diff --git a/module/plugins/crypter/RelinkUs.py b/module/plugins/crypter/RelinkUs.py
index e3082be00..ed3da1f9b 100644
--- a/module/plugins/crypter/RelinkUs.py
+++ b/module/plugins/crypter/RelinkUs.py
@@ -153,7 +153,7 @@ class RelinkUs(Crypter):
# Try to get info from web
m = re.search(self.FILE_TITLE_REGEX, self.html)
- if m is not None:
+ if m:
title = m.group(1).strip()
if not self.FILE_NOTITLE in title:
name = folder = title
@@ -198,7 +198,7 @@ class RelinkUs(Crypter):
self.logDebug("Search for CNL2 links")
package_links = []
m = re.search(self.CNL2_FORM_REGEX, self.html, re.S)
- if m is not None:
+ if m:
cnl2_form = m.group(1)
try:
(vcrypted, vjk) = self._getCipherParams(cnl2_form)
@@ -213,7 +213,7 @@ class RelinkUs(Crypter):
self.logDebug("Search for DLC links")
package_links = []
m = re.search(self.DLC_LINK_REGEX, self.html)
- if m is not None:
+ if m:
container_url = self.DLC_DOWNLOAD_URL + "?id=%s&dlc=1" % self.fileid
self.logDebug("Downloading DLC container link [%s]" % container_url)
try:
diff --git a/module/plugins/crypter/ShareLinksBiz.py b/module/plugins/crypter/ShareLinksBiz.py
index 4a0b61b5f..f17ba54d7 100644
--- a/module/plugins/crypter/ShareLinksBiz.py
+++ b/module/plugins/crypter/ShareLinksBiz.py
@@ -164,7 +164,7 @@ class ShareLinksBiz(Crypter):
# Extract from web package header
title_re = r'<h2><img.*?/>(.*)</h2>'
m = re.search(title_re, self.html, re.S)
- if m is not None:
+ if m:
title = m.group(1).strip()
if 'unnamed' not in title:
name = folder = title
diff --git a/module/plugins/hoster/EuroshareEu.py b/module/plugins/hoster/EuroshareEu.py
index c5059e69e..922665c2e 100644
--- a/module/plugins/hoster/EuroshareEu.py
+++ b/module/plugins/hoster/EuroshareEu.py
@@ -48,7 +48,7 @@ class EuroshareEu(SimpleHoster):
def handleFree(self, pyfile):
- if re.search(self.ERR_PARDL_PATTERN, self.html) is not None:
+ if re.search(self.ERR_PARDL_PATTERN, self.html):
self.longWait(5 * 60, 12)
m = re.search(self.LINK_FREE_PATTERN, self.html)
diff --git a/module/plugins/hoster/FreakshareCom.py b/module/plugins/hoster/FreakshareCom.py
index 9a11f933d..6a595e75b 100644
--- a/module/plugins/hoster/FreakshareCom.py
+++ b/module/plugins/hoster/FreakshareCom.py
@@ -107,12 +107,14 @@ class FreakshareCom(Hoster):
def get_file_name(self):
if not self.html:
self.download_html()
+
if not self.wantReconnect:
- file_name = re.search(r"<h1\sclass=\"box_heading\"\sstyle=\"text-align:center;\">([^ ]+)", self.html)
- if file_name is not None:
- file_name = file_name.group(1)
+ m = re.search(r"<h1\sclass=\"box_heading\"\sstyle=\"text-align:center;\">([^ ]+)", self.html)
+ if m:
+ file_name = m.group(1)
else:
file_name = self.pyfile.url
+
return file_name
else:
return self.pyfile.url
@@ -122,12 +124,12 @@ class FreakshareCom(Hoster):
size = 0
if not self.html:
self.download_html()
+
if not self.wantReconnect:
- file_size_check = re.search(
- r"<h1\sclass=\"box_heading\"\sstyle=\"text-align:center;\">[^ ]+ - ([^ ]+) (\w\w)yte", self.html)
- if file_size_check is not None:
- units = float(file_size_check.group(1).replace(",", ""))
- pow = {'KB': 1, 'MB': 2, 'GB': 3}[file_size_check.group(2)]
+ m = re.search(r"<h1\sclass=\"box_heading\"\sstyle=\"text-align:center;\">[^ ]+ - ([^ ]+) (\w\w)yte", self.html)
+ if m:
+ units = float(m.group(1).replace(",", ""))
+ pow = {'KB': 1, 'MB': 2, 'GB': 3}[m.group(2)]
size = int(units * 1024 ** pow)
return size
@@ -153,7 +155,7 @@ class FreakshareCom(Hoster):
"""
if not self.html:
self.download_html()
- if re.search(r"This file does not exist!", self.html) is not None:
+ if re.search(r"This file does not exist!", self.html):
return False
else:
return True
diff --git a/module/plugins/hoster/NetloadIn.py b/module/plugins/hoster/NetloadIn.py
index 0ff3c25d3..57af3f18e 100644
--- a/module/plugins/hoster/NetloadIn.py
+++ b/module/plugins/hoster/NetloadIn.py
@@ -268,7 +268,7 @@ class NetloadIn(Hoster):
try:
file_url_pattern = r'<a class="Orange_Link" href="(http://.+)".?>Or click here'
attempt = re.search(file_url_pattern, page)
- if attempt is not None:
+ if attempt:
return attempt.group(1)
else:
self.logDebug("Backup try for final link")
diff --git a/module/plugins/hoster/OverLoadMe.py b/module/plugins/hoster/OverLoadMe.py
index 398946e43..934de5746 100644
--- a/module/plugins/hoster/OverLoadMe.py
+++ b/module/plugins/hoster/OverLoadMe.py
@@ -42,7 +42,7 @@ class OverLoadMe(MultiHoster):
self.logWarning(data['msg'])
self.tempOffline()
else:
- if pyfile.name is not None and pyfile.name.endswith('.tmp') and data['filename']:
+ if pyfile.name and pyfile.name.endswith('.tmp') and data['filename']:
pyfile.name = data['filename']
pyfile.size = parseFileSize(data['filesize'])
diff --git a/module/plugins/hoster/PornhubCom.py b/module/plugins/hoster/PornhubCom.py
index 9e0b16a85..16ce36ea9 100644
--- a/module/plugins/hoster/PornhubCom.py
+++ b/module/plugins/hoster/PornhubCom.py
@@ -83,7 +83,7 @@ class PornhubCom(Hoster):
if not self.html:
self.download_html()
- if re.search(r'This video is no longer in our database or is in conversion', self.html) is not None:
+ if re.search(r'This video is no longer in our database or is in conversion', self.html):
return False
else:
return True
diff --git a/module/plugins/hoster/RealdebridCom.py b/module/plugins/hoster/RealdebridCom.py
index 1a8715e0e..f35eb5e03 100644
--- a/module/plugins/hoster/RealdebridCom.py
+++ b/module/plugins/hoster/RealdebridCom.py
@@ -44,7 +44,7 @@ class RealdebridCom(MultiHoster):
self.logWarning(data['message'])
self.tempOffline()
else:
- if pyfile.name is not None and pyfile.name.endswith('.tmp') and data['file_name']:
+ if pyfile.name and pyfile.name.endswith('.tmp') and data['file_name']:
pyfile.name = data['file_name']
pyfile.size = parseFileSize(data['file_size'])
self.link = data['generated_links'][0][-1]
diff --git a/module/plugins/hoster/RedtubeCom.py b/module/plugins/hoster/RedtubeCom.py
index d68fbe262..9051c498a 100644
--- a/module/plugins/hoster/RedtubeCom.py
+++ b/module/plugins/hoster/RedtubeCom.py
@@ -56,7 +56,7 @@ class RedtubeCom(Hoster):
if not self.html:
self.download_html()
- if re.search(r'This video has been removed.', self.html) is not None:
+ if re.search(r'This video has been removed.', self.html):
return False
else:
return True
diff --git a/module/plugins/hoster/ShareplaceCom.py b/module/plugins/hoster/ShareplaceCom.py
index 07724a9d1..c540dd2df 100644
--- a/module/plugins/hoster/ShareplaceCom.py
+++ b/module/plugins/hoster/ShareplaceCom.py
@@ -83,7 +83,7 @@ class ShareplaceCom(Hoster):
if not self.html:
self.download_html()
- if re.search(r"HTTP Status 404", self.html) is not None:
+ if re.search(r"HTTP Status 404", self.html):
return False
else:
return True
diff --git a/module/plugins/hoster/XHamsterCom.py b/module/plugins/hoster/XHamsterCom.py
index fd494e099..9004dbac0 100644
--- a/module/plugins/hoster/XHamsterCom.py
+++ b/module/plugins/hoster/XHamsterCom.py
@@ -123,7 +123,7 @@ class XHamsterCom(Hoster):
"""
if not self.html:
self.download_html()
- if re.search(r"(.*Video not found.*)", self.html) is not None:
+ if re.search(r"(.*Video not found.*)", self.html):
return False
else:
return True
diff --git a/module/plugins/hoster/YoupornCom.py b/module/plugins/hoster/YoupornCom.py
index 4bb2520e6..19d07fa36 100644
--- a/module/plugins/hoster/YoupornCom.py
+++ b/module/plugins/hoster/YoupornCom.py
@@ -54,7 +54,7 @@ class YoupornCom(Hoster):
"""
if not self.html:
self.download_html()
- if re.search(r"(.*invalid video_id.*)", self.html) is not None:
+ if re.search(r"(.*invalid video_id.*)", self.html):
return False
else:
return True
diff --git a/module/plugins/hoster/YourfilesTo.py b/module/plugins/hoster/YourfilesTo.py
index e0def108e..fd65a6a41 100644
--- a/module/plugins/hoster/YourfilesTo.py
+++ b/module/plugins/hoster/YourfilesTo.py
@@ -81,7 +81,7 @@ class YourfilesTo(Hoster):
if not self.html:
self.download_html()
- if re.search(r"HTTP Status 404", self.html) is not None:
+ if re.search(r"HTTP Status 404", self.html):
return False
else:
return True
diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py
index 79b7c0534..8b1527b3e 100644
--- a/module/plugins/internal/SimpleHoster.py
+++ b/module/plugins/internal/SimpleHoster.py
@@ -30,7 +30,7 @@ def _error(self, reason, type):
type = "unknown"
msg = _("%s error") % type.strip().capitalize() if type else _("Error")
- msg += ": %s" % reason.strip() if reason else ""
+ msg += (": %s" % reason.strip()) if reason else ""
msg += _(" | Plugin may be out of date")
raise Fail(msg)