diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-07-28 19:15:28 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-07-28 19:15:28 +0200 |
commit | 9e44724d6dda3e1f47cf4d6de4b3e521a244ba4b (patch) | |
tree | 258736a130c3b227ff2c2d6c0ef95a87e6ce8c44 | |
parent | Fix http://forum.pyload.org/viewtopic.php?f=12&t=4410 (diff) | |
download | pyload-9e44724d6dda3e1f47cf4d6de4b3e521a244ba4b.tar.xz |
Fix content-disposition
-rw-r--r-- | module/plugins/hooks/UpdateManager.py | 5 | ||||
-rw-r--r-- | module/plugins/hooks/XFileSharingPro.py | 8 | ||||
-rw-r--r-- | module/plugins/hoster/GoogledriveCom.py | 4 | ||||
-rw-r--r-- | module/plugins/hoster/OneFichierCom.py | 3 | ||||
-rw-r--r-- | module/plugins/hoster/UlozTo.py | 3 | ||||
-rw-r--r-- | module/plugins/hoster/UpleaCom.py | 4 | ||||
-rw-r--r-- | module/plugins/hoster/UploadedTo.py | 3 | ||||
-rw-r--r-- | module/plugins/internal/Account.py | 2 | ||||
-rw-r--r-- | module/plugins/internal/Hoster.py | 6 | ||||
-rw-r--r-- | module/plugins/internal/MultiHoster.py | 4 |
10 files changed, 16 insertions, 26 deletions
diff --git a/module/plugins/hooks/UpdateManager.py b/module/plugins/hooks/UpdateManager.py index 0de3d05dc..2f82bc498 100644 --- a/module/plugins/hooks/UpdateManager.py +++ b/module/plugins/hooks/UpdateManager.py @@ -2,14 +2,13 @@ from __future__ import with_statement +import operator import os import re import sys import time import traceback -from operator import itemgetter - from module.plugins.internal.Addon import Expose, Addon, threaded from module.plugins.internal.Plugin import exists from module.utils import fs_encode, save_join as fs_join @@ -224,7 +223,7 @@ class UpdateManager(Addon): 'name': n, }) - for plugin in sorted(updatelist, key=itemgetter("type", "name")): + for plugin in sorted(updatelist, key=operator.itemgetter("type", "name")): filename = plugin['name'] prefix = plugin['type'] version = plugin['version'] diff --git a/module/plugins/hooks/XFileSharingPro.py b/module/plugins/hooks/XFileSharingPro.py index 6ffbb7f29..eed1c01de 100644 --- a/module/plugins/hooks/XFileSharingPro.py +++ b/module/plugins/hooks/XFileSharingPro.py @@ -29,10 +29,10 @@ class XFileSharingPro(Hook): r'https?://(?:[^/]+\.)?(?P<DOMAIN>%s)/(?:user|folder)s?/\w+')} HOSTER_BUILTIN = [#WORKING HOSTERS: - "ani-stream.com", "backin.net", "eyesfile.ca", "file4safe.com", - "fileband.com", "filedwon.com", "fileparadox.in", "filevice.com", - "hostingbulk.com", "junkyvideo.com", "linestorage.com", "ravishare.com", - "ryushare.com", "salefiles.com", "sendmyway.com", "sharebeast.com", + "ani-stream.com", "backin.net", "eyesfile.ca", "file4safe.com", + "fileband.com", "filedwon.com", "fileparadox.in", "filevice.com", + "hostingbulk.com", "junkyvideo.com", "linestorage.com", "ravishare.com", + "ryushare.com", "salefiles.com", "sendmyway.com", "sharebeast.com", "sharesix.com", "thefile.me", "verzend.be", "worldbytez.com", "xvidstage.com", #: NOT TESTED: "101shared.com", "4upfiles.com", "filemaze.ws", "filenuke.com", diff --git a/module/plugins/hoster/GoogledriveCom.py b/module/plugins/hoster/GoogledriveCom.py index bdcfc5a39..903b5361e 100644 --- a/module/plugins/hoster/GoogledriveCom.py +++ b/module/plugins/hoster/GoogledriveCom.py @@ -13,7 +13,7 @@ from module.utils import html_unescape class GoogledriveCom(SimpleHoster): __name__ = "GoogledriveCom" __type__ = "hoster" - __version__ = "0.13" + __version__ = "0.14" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?(drive|docs)\.google\.com/(file/d/\w+|uc\?.*id=)' @@ -24,8 +24,6 @@ class GoogledriveCom(SimpleHoster): __authors__ = [("zapp-brannigan", "fuerst.reinje@web.de")] - DISPOSITION = False #: Remove in 0.4.10 - NAME_PATTERN = r'(?:<title>|class="uc-name-size".*>)(?P<N>.+?)(?: - Google Drive</title>|</a> \()' OFFLINE_PATTERN = r'align="center"><p class="errorMessage"' diff --git a/module/plugins/hoster/OneFichierCom.py b/module/plugins/hoster/OneFichierCom.py index 24fc6fee8..c564dc677 100644 --- a/module/plugins/hoster/OneFichierCom.py +++ b/module/plugins/hoster/OneFichierCom.py @@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class OneFichierCom(SimpleHoster): __name__ = "OneFichierCom" __type__ = "hoster" - __version__ = "0.85" + __version__ = "0.86" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?(?:(?P<ID1>\w+)\.)?(?P<HOST>1fichier\.com|alterupload\.com|cjoint\.net|d(es)?fichiers\.com|dl4free\.com|megadl\.fr|mesfichiers\.org|piecejointe\.net|pjointe\.com|tenvoi\.com)(?:/\?(?P<ID2>\w+))?' @@ -27,7 +27,6 @@ class OneFichierCom(SimpleHoster): COOKIES = [("1fichier.com", "LG", "en")] - DISPOSITION = False #: Remove in 0.4.10 NAME_PATTERN = r'>FileName :</td>\s*<td.*>(?P<N>.+?)<' SIZE_PATTERN = r'>Size :</td>\s*<td.*>(?P<S>[\d.,]+) (?P<U>[\w^_]+)' diff --git a/module/plugins/hoster/UlozTo.py b/module/plugins/hoster/UlozTo.py index 73261324b..2653b720e 100644 --- a/module/plugins/hoster/UlozTo.py +++ b/module/plugins/hoster/UlozTo.py @@ -15,7 +15,7 @@ def convert_decimal_prefix(m): class UlozTo(SimpleHoster): __name__ = "UlozTo" __type__ = "hoster" - __version__ = "1.11" + __version__ = "1.12" __status__ = "testing" __pattern__ = r'http://(?:www\.)?(uloz\.to|ulozto\.(cz|sk|net)|bagruj\.cz|zachowajto\.pl)/(?:live/)?(?P<ID>\w+/[^/?]*)' @@ -35,7 +35,6 @@ class UlozTo(SimpleHoster): SIZE_REPLACEMENTS = [(r'([\d.]+)\s([kMG])B', convertDecimalPrefix)] CHECK_TRAFFIC = True - DISPOSITION = False #: Remove in 0.4.10 ADULT_PATTERN = r'<form action="(.+?)" method="post" id="frm-askAgeForm">' PASSWD_PATTERN = r'<div class="passwordProtectedFile">' diff --git a/module/plugins/hoster/UpleaCom.py b/module/plugins/hoster/UpleaCom.py index 0491ff1e2..db9517f42 100644 --- a/module/plugins/hoster/UpleaCom.py +++ b/module/plugins/hoster/UpleaCom.py @@ -9,7 +9,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo class UpleaCom(XFSHoster): __name__ = "UpleaCom" __type__ = "hoster" - __version__ = "0.11" + __version__ = "0.12" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?uplea\.com/dl/\w{15}' @@ -20,8 +20,6 @@ class UpleaCom(XFSHoster): ("GammaC0de", None)] - DISPOSITION = False #@TODO: Remove in 0.4.10 - HOSTER_DOMAIN = "uplea.com" SIZE_REPLACEMENTS = [('ko','KB'), ('mo','MB'), ('go','GB'), ('Ko','KB'), ('Mo','MB'), ('Go','GB')] diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py index b1d570328..c90f2bb0f 100644 --- a/module/plugins/hoster/UploadedTo.py +++ b/module/plugins/hoster/UploadedTo.py @@ -12,7 +12,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class UploadedTo(SimpleHoster): __name__ = "UploadedTo" __type__ = "hoster" - __version__ = "0.95" + __version__ = "0.96" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?(uploaded\.(to|net)|ul\.to)(/file/|/?\?id=|.*?&id=|/)(?P<ID>\w+)' @@ -24,7 +24,6 @@ class UploadedTo(SimpleHoster): CHECK_TRAFFIC = True - DISPOSITION = False URL_REPLACEMENTS = [(__pattern__ + ".*", r'http://uploaded.net/file/\g<ID>')] diff --git a/module/plugins/internal/Account.py b/module/plugins/internal/Account.py index b8230a09d..788b62e7e 100644 --- a/module/plugins/internal/Account.py +++ b/module/plugins/internal/Account.py @@ -5,8 +5,6 @@ import time import threading import traceback -from operator import itemgetter - from module.plugins.internal.Plugin import Plugin from module.utils import compare_time, lock, parseFileSize as parse_size diff --git a/module/plugins/internal/Hoster.py b/module/plugins/internal/Hoster.py index 15344b86b..fdfe92593 100644 --- a/module/plugins/internal/Hoster.py +++ b/module/plugins/internal/Hoster.py @@ -47,7 +47,7 @@ def create_getInfo(klass): class Hoster(Plugin): __name__ = "Hoster" __type__ = "hoster" - __version__ = "0.08" + __version__ = "0.09" __status__ = "testing" __pattern__ = r'^unmatchable$' @@ -355,7 +355,7 @@ class Hoster(Plugin): return url - def download(self, url, get={}, post={}, ref=True, cookies=True, disposition=False): + def download(self, url, get={}, post={}, ref=True, cookies=True, disposition=True): """ Downloads the content at url to download folder @@ -420,7 +420,7 @@ class Hoster(Plugin): self.pyfile.size = self.req.size if newname: - newname = urlparse.urlparse(newname).path.split('/')[-1] + newname = urlparse.urlparse(newname).path.split('/')[-1].split('*=')[-1] #@TODO: Remove in 0.4.10 if disposition and newname is not name: self.log_info(_("%(name)s saved as %(newname)s") % {'name': name, 'newname': newname}) diff --git a/module/plugins/internal/MultiHoster.py b/module/plugins/internal/MultiHoster.py index aec83e246..8e336fbc6 100644 --- a/module/plugins/internal/MultiHoster.py +++ b/module/plugins/internal/MultiHoster.py @@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, r class MultiHoster(SimpleHoster): __name__ = "MultiHoster" __type__ = "hoster" - __version__ = "0.45" + __version__ = "0.46" __status__ = "testing" __pattern__ = r'^unmatchable$' @@ -80,7 +80,7 @@ class MultiHoster(SimpleHoster): if not self.last_download: self.log_info(_("Downloading file...")) - self.download(self.link, disposition=True) + self.download(self.link, disposition=self.DISPOSITION) self.check_file() |