summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
Diffstat (limited to 'module')
-rw-r--r--module/plugins/Plugin.py12
-rw-r--r--module/plugins/internal/SimpleHoster.py10
2 files changed, 11 insertions, 11 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")])
diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py
index 2c95c8b38..87a348367 100644
--- a/module/plugins/internal/SimpleHoster.py
+++ b/module/plugins/internal/SimpleHoster.py
@@ -200,7 +200,7 @@ def timestamp():
class SimpleHoster(Hoster):
__name__ = "SimpleHoster"
__type__ = "hoster"
- __version__ = "0.51"
+ __version__ = "0.52"
__pattern__ = r'^unmatchable$'
@@ -268,7 +268,7 @@ class SimpleHoster(Hoster):
self.FILE_URL_REPLACEMENTS if hasattr(self, "FILE_URL_REPLACEMENTS") else self.URL_REPLACEMENTS) #@TODO: Remove FILE_URL_REPLACEMENTS check in 0.4.10
if self.premium:
- self.logDebug(_("Checking for direct download link..."))
+ self.logDebug(_("Looking for direct download link..."))
direct_link = self.getDirectLink(self.pyfile.url)
if direct_link:
return direct_link
@@ -300,12 +300,12 @@ class SimpleHoster(Hoster):
self.getFileInfo()
if self.premium and (not self.FORCE_CHECK_TRAFFIC or self.checkTrafficLeft()):
- self.logDebug("Handled as premium download")
+ self.logDebug("Handle as premium download")
self.handlePremium()
elif premium_only:
self.fail(_("Link require a premium account to be handled"))
else:
- self.logDebug("Handled as free download")
+ self.logDebug("Handle as free download")
self.handleFree()
@@ -318,7 +318,7 @@ class SimpleHoster(Hoster):
if parseFileInfo(self, url, html)[2] is not 2:
try:
- return re.search(r"Location\s*:\s*(.+)", self.req.http.header, re.I).group(1).strip() #@TODO: Remove .strip() in 0.4.10
+ return re.search(r"Location\s*:\s*(.+)", self.req.http.header, re.I).group(1).strip().lower() #@TODO: Remove .strip().lower() in 0.4.10
except:
pass