summaryrefslogtreecommitdiffstats
path: root/module/plugins/internal
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-07-15 16:25:41 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-07-15 16:25:41 +0200
commit5060e4c6374a5116d0d8b02528f910f8c5f8bcf9 (patch)
treeb3f80dbd9e759747f9c2acb60f614c5daa7af69e /module/plugins/internal
parentFix class definition (diff)
downloadpyload-5060e4c6374a5116d0d8b02528f910f8c5f8bcf9.tar.xz
Fix code indentation, some bad whitespaces and missing authors + use 'not' instead 'is None' + replace __pattern__'s r" with r' + other minor cosmetics
Diffstat (limited to 'module/plugins/internal')
-rw-r--r--module/plugins/internal/CaptchaService.py1
-rw-r--r--module/plugins/internal/DeadHoster.py2
-rw-r--r--module/plugins/internal/SimpleHoster.py4
3 files changed, 6 insertions, 1 deletions
diff --git a/module/plugins/internal/CaptchaService.py b/module/plugins/internal/CaptchaService.py
index b2f73e4ea..d8306bbb7 100644
--- a/module/plugins/internal/CaptchaService.py
+++ b/module/plugins/internal/CaptchaService.py
@@ -60,6 +60,7 @@ class ReCaptcha:
class AdsCaptcha(CaptchaService):
+
def challenge(self, src):
js = self.plugin.req.load(src, cookies=True)
diff --git a/module/plugins/internal/DeadHoster.py b/module/plugins/internal/DeadHoster.py
index 77ee7c74f..a7cf1f3ea 100644
--- a/module/plugins/internal/DeadHoster.py
+++ b/module/plugins/internal/DeadHoster.py
@@ -4,8 +4,10 @@ from module.plugins.Hoster import Hoster as _Hoster
def create_getInfo(plugin):
+
def getInfo(urls):
yield [('#N/A: ' + url, 0, 1, url) for url in urls]
+
return getInfo
diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py
index e9ba59c0d..ba143f4d8 100644
--- a/module/plugins/internal/SimpleHoster.py
+++ b/module/plugins/internal/SimpleHoster.py
@@ -53,7 +53,7 @@ def parseHtmlForm(attr_str, html, input_names=None):
name = parseHtmlTagAttrValue("name", inputtag.group(1))
if name:
value = parseHtmlTagAttrValue("value", inputtag.group(1))
- if value is None:
+ if not value:
inputs[name] = inputtag.group(3) or ''
else:
inputs[name] = value
@@ -135,6 +135,7 @@ def parseFileInfo(self, url='', html=''):
def create_getInfo(plugin):
+
def getInfo(urls):
for url in urls:
cj = CookieJar(plugin.__name__)
@@ -152,6 +153,7 @@ def timestamp():
class PluginParseError(Exception):
+
def __init__(self, msg):
Exception.__init__(self)
self.value = 'Parse error (%s) - plugin may be out of date' % msg