diff options
Diffstat (limited to 'module/plugins/internal/SimpleHoster.py')
-rw-r--r-- | module/plugins/internal/SimpleHoster.py | 6 |
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) |