summaryrefslogtreecommitdiffstats
path: root/module/plugins/crypter
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-04-08 15:38:01 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-04-08 15:38:01 +0200
commit02e3ede3edcf4415ac466fbea9d4f25d9ccc8671 (patch)
tree81084f9263f9229790e62097957d5132f18028e9 /module/plugins/crypter
parent[UserAgentSwitcher] Random user-agent feature (diff)
downloadpyload-02e3ede3edcf4415ac466fbea9d4f25d9ccc8671.tar.xz
Spare code cosmetics
Diffstat (limited to 'module/plugins/crypter')
-rw-r--r--module/plugins/crypter/NCryptIn.py2
-rw-r--r--module/plugins/crypter/RelinkUs.py6
-rw-r--r--module/plugins/crypter/ShareLinksBiz.py2
3 files changed, 5 insertions, 5 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