diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-07-19 00:28:18 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-07-19 00:28:18 +0200 |
commit | a0e2459f2d1506912ac4a5d0c330c8dae01a4768 (patch) | |
tree | f7fcbc10a7b1b5b862889b5388b319a43fce7dc9 /module/plugins/internal/SimpleHoster.py | |
parent | Code cosmetics (2) (diff) | |
download | pyload-a0e2459f2d1506912ac4a5d0c330c8dae01a4768.tar.xz |
Improve fixurl method
Diffstat (limited to 'module/plugins/internal/SimpleHoster.py')
-rw-r--r-- | module/plugins/internal/SimpleHoster.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index 08f13f900..5bf2f0417 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -7,14 +7,13 @@ import mimetypes import os import re import time -import urllib import urlparse from module.PyFile import statusMap as _statusMap from module.network.HTTPRequest import BadHeader from module.network.RequestFactory import getURL as get_url from module.plugins.internal.Hoster import Hoster, create_getInfo, parse_fileInfo -from module.plugins.internal.Plugin import Fail, Retry, replace_patterns, set_cookies +from module.plugins.internal.Plugin import Fail, Retry, fixurl, replace_patterns, set_cookies from module.utils import fixup, fs_encode, parseFileSize as parse_size @@ -176,7 +175,7 @@ class SimpleHoster(Hoster): info['status'] = 2 if 'N' in info['pattern']: - info['name'] = replace_patterns(urllib.unquote(info['pattern']['N'].strip()), + info['name'] = replace_patterns(fixurl(info['pattern']['N']), cls.NAME_REPLACEMENTS) if 'S' in info['pattern']: |