From bc3f5f4903444e438a8a07688c82f0c2995dafa9 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 30 Nov 2014 21:15:54 +0100 Subject: [SimpleHoster] Unquote file name --- module/plugins/hoster/FastshareCz.py | 1 - module/plugins/hoster/ZippyshareCom.py | 15 ++++----------- 2 files changed, 4 insertions(+), 12 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/FastshareCz.py b/module/plugins/hoster/FastshareCz.py index 1467a0909..14931f681 100644 --- a/module/plugins/hoster/FastshareCz.py +++ b/module/plugins/hoster/FastshareCz.py @@ -75,7 +75,6 @@ class FastshareCz(SimpleHoster): else: self.error(_("PREMIUM_URL_PATTERN not found")) - self.logDebug("PREMIUM URL: " + url) self.download(url, disposition=True) check = self.checkDownload({"credit": re.compile(self.CREDIT_PATTERN)}) diff --git a/module/plugins/hoster/ZippyshareCom.py b/module/plugins/hoster/ZippyshareCom.py index 8bf5aa942..0f41d338a 100644 --- a/module/plugins/hoster/ZippyshareCom.py +++ b/module/plugins/hoster/ZippyshareCom.py @@ -2,8 +2,7 @@ import re -from os import path -from urllib import unquote +from os.path import join from urlparse import urljoin from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo @@ -12,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class ZippyshareCom(SimpleHoster): __name__ = "ZippyshareCom" __type__ = "hoster" - __version__ = "0.60" + __version__ = "0.61" __pattern__ = r'(?Phttp://www\d{0,2}\.zippyshare\.com)/v(?:/|iew\.jsp.*key=)(?P\d+)' @@ -40,12 +39,6 @@ class ZippyshareCom(SimpleHoster): self.download(url) - def getFileInfo(self): - info = super(ZippyshareCom, self).getFileInfo() - self.pyfile.name = info['name'] = unquote(info['name']) - return info - - def get_checksum(self): try: m = re.search(r'\+[ ]*\((\d+)[ ]*\%[ ]*(\d+)[ ]*\+[ ]*(\d+)[ ]*\%[ ]*(\d+)\)[ ]*\+', self.html) @@ -64,8 +57,8 @@ class ZippyshareCom(SimpleHoster): def get_link(self): checksum = self.get_checksum() - p_url = path.join("d", self.info['KEY'], str(checksum), self.pyfile.name) - dl_link = urljoin(self.info['HOST'], p_url) + p_url = join("d", self.info['KEY'], str(checksum), self.pyfile.name) + dl_link = urljoin(self.info['HOST'], p_url) return dl_link -- cgit v1.2.3