diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-11-30 21:15:54 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-12-01 18:23:06 +0100 |
commit | bc3f5f4903444e438a8a07688c82f0c2995dafa9 (patch) | |
tree | 2907bbd0e1b1d326ea394f34bb7b7b84ddd0b25f /module | |
parent | [EasybytezCom] Revert loadAccountInfo (diff) | |
download | pyload-bc3f5f4903444e438a8a07688c82f0c2995dafa9.tar.xz |
[SimpleHoster] Unquote file name
Diffstat (limited to 'module')
-rw-r--r-- | module/plugins/hoster/FastshareCz.py | 1 | ||||
-rw-r--r-- | module/plugins/hoster/ZippyshareCom.py | 15 | ||||
-rw-r--r-- | module/plugins/internal/SimpleHoster.py | 5 |
3 files changed, 7 insertions, 14 deletions
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'(?P<HOST>http://www\d{0,2}\.zippyshare\.com)/v(?:/|iew\.jsp.*key=)(?P<KEY>\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 diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index 24a2fa6b0..f741cd691 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -3,6 +3,7 @@ import re from time import time +from urllib import unquote from urlparse import urlparse from module.PyFile import statusMap as _statusMap @@ -131,7 +132,7 @@ def _getDirectLink(self, url): class SimpleHoster(Hoster): __name__ = "SimpleHoster" __type__ = "hoster" - __version__ = "0.67" + __version__ = "0.68" __pattern__ = r'^unmatchable$' @@ -249,7 +250,7 @@ class SimpleHoster(Hoster): info['status'] = 2 if 'N' in info: - info['name'] = replace_patterns(info['N'].strip(), + info['name'] = replace_patterns(unquote(info['N'].strip()), cls.FILE_NAME_REPLACEMENTS if hasattr(cls, "FILE_NAME_REPLACEMENTS") else cls.NAME_REPLACEMENTS) #@TODO: Remove FILE_NAME_REPLACEMENTS check in 0.4.10 if 'S' in info: |