summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-04-30 19:07:01 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-04-30 19:07:01 +0200
commitbe6222dd5df95f524dbe6e5a139fbcb8fb583e7b (patch)
treef36ee78b06b728b9f94cd70c972f13c2570d2e0d
parentMerge pull request #1385 from GammaC0de/GammaC0de-UploadedTo-Detect-Maintenance (diff)
parentUpdate SimpleHoster.py (diff)
downloadpyload-be6222dd5df95f524dbe6e5a139fbcb8fb583e7b.tar.xz
Merge pull request #1386 from GammaC0de/GammaC0de-ContentDisposition-fix
[SimpleHoster] fix 'Content-Disposition' filename sometime missing first and last chars
-rw-r--r--module/plugins/internal/SimpleHoster.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py
index d65d12403..0bc529cbe 100644
--- a/module/plugins/internal/SimpleHoster.py
+++ b/module/plugins/internal/SimpleHoster.py
@@ -245,7 +245,7 @@ def secondsToMidnight(gmt=0):
class SimpleHoster(Hoster):
__name__ = "SimpleHoster"
__type__ = "hoster"
- __version__ = "1.38"
+ __version__ = "1.39"
__pattern__ = r'^unmatchable$'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -501,7 +501,7 @@ class SimpleHoster(Hoster):
try:
if disposition:
content = urllib2.urlopen(url).info()['Content-Disposition'].split(';')
- self.pyfile.name = (content[1].split('filename=')[1][1:-1]
+ self.pyfile.name = (content[1].split('filename=')[1].strip('"\'')
or urlparse.urlparse(urllib.unquote(url)).path.split('/')[-1]
or self.pyfile.name)
finally: