summaryrefslogtreecommitdiffstats
path: root/module/plugins/Plugin.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-11-06 22:42:59 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-11-06 22:42:59 +0100
commit6bcfdef32e7e62f8f749ceb6618ee7550bce28de (patch)
treec08233bd814def738e6fe20f03c3132de541ef2b /module/plugins/Plugin.py
parent[XFSHoster] Fix Multi hoster detection (diff)
downloadpyload-6bcfdef32e7e62f8f749ceb6618ee7550bce28de.tar.xz
Lowercase url to load
Diffstat (limited to 'module/plugins/Plugin.py')
-rw-r--r--module/plugins/Plugin.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/module/plugins/Plugin.py b/module/plugins/Plugin.py
index cdf0f147d..f80eb461b 100644
--- a/module/plugins/Plugin.py
+++ b/module/plugins/Plugin.py
@@ -458,10 +458,10 @@ class Plugin(Base):
if self.pyfile.abort:
raise Abort
- url = url.strip()
- #utf8 vs decode -> please use decode attribute in all future plugins
- if type(url) == unicode:
- url = str(url) # encode('utf8')
+ url = url.strip().lower()
+
+ if type(url) == unicode: # utf8 vs decode -> please use decode attribute in all future plugins
+ url = str(url) #: encode('utf8')
if self.core.debug:
self.logDebug("Load url: " + url, *["%s=%s" % (key, val) for key, val in locals().iteritems() if key not in ("self", "url")])
@@ -496,7 +496,7 @@ class Plugin(Base):
if not line or ":" not in line: continue
key, none, value = line.partition(":")
- key = key.lower().strip()
+ key = key.strip().lower()
value = value.strip()
if key in header:
@@ -526,7 +526,7 @@ class Plugin(Base):
if self.pyfile.abort:
raise Abort
- url = url.strip()
+ url = url.strip().lower()
if self.core.debug:
self.logDebug("Download url: " + url, *["%s=%s" % (key, val) for key, val in locals().iteritems() if key not in ("self", "url")])