summaryrefslogtreecommitdiffstats
path: root/module/plugins/crypter
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2015-02-08 02:09:45 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2015-02-08 02:15:53 +0100
commitb25bc61dd47d8d3c42969bd0f72443b21c4b059e (patch)
tree6115841c9763289bd400c6171508f397d3526bf5 /module/plugins/crypter
parent[ZippyshareCom] Typo (diff)
downloadpyload-b25bc61dd47d8d3c42969bd0f72443b21c4b059e.tar.xz
Spare code cosmetics
Diffstat (limited to 'module/plugins/crypter')
-rw-r--r--module/plugins/crypter/DailymotionBatch.py6
-rw-r--r--module/plugins/crypter/FilecryptCc.py4
-rw-r--r--module/plugins/crypter/LinkCryptWs.py3
-rw-r--r--module/plugins/crypter/NCryptIn.py3
-rw-r--r--module/plugins/crypter/RelinkUs.py3
-rw-r--r--module/plugins/crypter/ShareLinksBiz.py3
-rw-r--r--module/plugins/crypter/YoutubeBatch.py6
7 files changed, 12 insertions, 16 deletions
diff --git a/module/plugins/crypter/DailymotionBatch.py b/module/plugins/crypter/DailymotionBatch.py
index 8d4cb64df..82b80ab2f 100644
--- a/module/plugins/crypter/DailymotionBatch.py
+++ b/module/plugins/crypter/DailymotionBatch.py
@@ -24,9 +24,9 @@ class DailymotionBatch(Crypter):
def api_response(self, ref, req=None):
- url = urljoin("https://api.dailymotion.com/", ref)
- page = self.load(url, get=req)
- return json_loads(page)
+ url = urljoin("https://api.dailymotion.com/", ref)
+ html = self.load(url, get=req)
+ return json_loads(html)
def getPlaylistInfo(self, id):
diff --git a/module/plugins/crypter/FilecryptCc.py b/module/plugins/crypter/FilecryptCc.py
index 6773ce9b6..d15d2ae4b 100644
--- a/module/plugins/crypter/FilecryptCc.py
+++ b/module/plugins/crypter/FilecryptCc.py
@@ -174,7 +174,7 @@ class FilecryptCc(Crypter):
text = obj.decrypt(crypted.decode('base64'))
# Extract links
- links = filter(lambda x: x != "",
- text.replace("\x00", "").replace("\r", "").split("\n"))
+ text = text.replace("\x00", "").replace("\r", "")
+ links = filter(bool, text.split('\n'))
return links
diff --git a/module/plugins/crypter/LinkCryptWs.py b/module/plugins/crypter/LinkCryptWs.py
index 098f2542f..018ed90ba 100644
--- a/module/plugins/crypter/LinkCryptWs.py
+++ b/module/plugins/crypter/LinkCryptWs.py
@@ -314,8 +314,7 @@ class LinkCryptWs(Crypter):
# Extract links
text = text.replace("\x00", "").replace("\r", "")
- links = text.split("\n")
- links = filter(lambda x: x != "", links)
+ links = filter(bool, text.split('\n'))
# Log and return
self.logDebug("Package has %d links" % len(links))
diff --git a/module/plugins/crypter/NCryptIn.py b/module/plugins/crypter/NCryptIn.py
index ecb913586..20e7c72e2 100644
--- a/module/plugins/crypter/NCryptIn.py
+++ b/module/plugins/crypter/NCryptIn.py
@@ -303,8 +303,7 @@ class NCryptIn(Crypter):
# Extract links
text = text.replace("\x00", "").replace("\r", "")
- links = text.split("\n")
- links = filter(lambda x: x != "", links)
+ links = filter(bool, text.split('\n'))
# Log and return
self.logDebug("Block has %d links" % len(links))
diff --git a/module/plugins/crypter/RelinkUs.py b/module/plugins/crypter/RelinkUs.py
index 860dff06b..c50481af0 100644
--- a/module/plugins/crypter/RelinkUs.py
+++ b/module/plugins/crypter/RelinkUs.py
@@ -286,8 +286,7 @@ class RelinkUs(Crypter):
# Extract links
text = text.replace("\x00", "").replace("\r", "")
- links = text.split("\n")
- links = filter(lambda x: x != "", links)
+ links = filter(bool, text.split('\n'))
# Log and return
self.logDebug("Package has %d links" % len(links))
diff --git a/module/plugins/crypter/ShareLinksBiz.py b/module/plugins/crypter/ShareLinksBiz.py
index d79735d42..00a037b2e 100644
--- a/module/plugins/crypter/ShareLinksBiz.py
+++ b/module/plugins/crypter/ShareLinksBiz.py
@@ -272,8 +272,7 @@ class ShareLinksBiz(Crypter):
# Extract links
text = text.replace("\x00", "").replace("\r", "")
- links = text.split("\n")
- links = filter(lambda x: x != "", links)
+ links = filter(bool, text.split('\n'))
# Log and return
self.logDebug("Block has %d links" % len(links))
diff --git a/module/plugins/crypter/YoutubeBatch.py b/module/plugins/crypter/YoutubeBatch.py
index 73ebf5fb3..40b4eedd2 100644
--- a/module/plugins/crypter/YoutubeBatch.py
+++ b/module/plugins/crypter/YoutubeBatch.py
@@ -31,9 +31,9 @@ class YoutubeBatch(Crypter):
def api_response(self, ref, req):
req.update({"key": self.API_KEY})
- url = urljoin("https://www.googleapis.com/youtube/v3/", ref)
- page = self.load(url, get=req)
- return json_loads(page)
+ url = urljoin("https://www.googleapis.com/youtube/v3/", ref)
+ html = self.load(url, get=req)
+ return json_loads(html)
def getChannel(self, user):