summaryrefslogtreecommitdiffstats
path: root/module/plugins/internal/SimpleHoster.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-05-29 01:53:28 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-05-29 01:53:28 +0200
commita51c92425e3b77b5a6b85babd29cc97411ee647c (patch)
treeee08aec5c3331159025c404ad287c581c2085cf8 /module/plugins/internal/SimpleHoster.py
parent[GooGl] Update (diff)
downloadpyload-a51c92425e3b77b5a6b85babd29cc97411ee647c.tar.xz
[SimpleDereferer] Handle direct link
Diffstat (limited to 'module/plugins/internal/SimpleHoster.py')
-rw-r--r--module/plugins/internal/SimpleHoster.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py
index 0a9986d4c..d362a9615 100644
--- a/module/plugins/internal/SimpleHoster.py
+++ b/module/plugins/internal/SimpleHoster.py
@@ -175,7 +175,7 @@ def getFileURL(self, url, follow_location=None):
if 'content-disposition' in header:
link = url
- elif 'location' in header and header['location'].strip():
+ elif 'location' in header and header['location']:
location = header['location']
if not urlparse.urlparse(location).scheme:
@@ -193,7 +193,7 @@ def getFileURL(self, url, follow_location=None):
else:
extension = os.path.splitext(urlparse.urlparse(url).path.split('/')[-1])[-1]
- if 'content-type' in header and header['content-type'].strip():
+ if 'content-type' in header and header['content-type']:
mimetype = header['content-type'].split(';')[0].strip()
elif extension:
@@ -509,7 +509,7 @@ class SimpleHoster(Hoster):
self.correctCaptcha()
- link = html_unescape(link.decode('unicode-escape')) #@TODO: Move this check to plugin `load` method in 0.4.10
+ link = html_unescape(link.strip().decode('unicode-escape')) #@TODO: Move this check to plugin `load` method in 0.4.10
if not urlparse.urlparse(link).scheme:
url_p = urlparse.urlparse(self.pyfile.url)