summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar GammaC0de <GammaC0de@users.noreply.github.com> 2015-04-29 22:31:10 +0200
committerGravatar GammaC0de <GammaC0de@users.noreply.github.com> 2015-04-29 22:31:10 +0200
commit7a4dfbcee41395e10c622aae0d015f550978df30 (patch)
tree55263bcc6c250b6a9894bd8d8c204b2f3570f8a0
parentMerge pull request #1 from GammaC0de/GammaC0de-patch-1 (diff)
downloadpyload-7a4dfbcee41395e10c622aae0d015f550978df30.tar.xz
fix 'Content-Disposition' filename cutting 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..f32d7c036 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: