From 9f1e50de4a446d6661fb6b89f058c8f2fd319e68 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Tue, 26 Oct 2010 16:42:52 +0200 Subject: closed #166, #169, #173, #174 --- module/plugins/hooks/UnRar.py | 2 +- module/plugins/hoster/MegauploadCom.py | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'module/plugins') diff --git a/module/plugins/hooks/UnRar.py b/module/plugins/hooks/UnRar.py index f47c08e89..46b9aac6a 100644 --- a/module/plugins/hooks/UnRar.py +++ b/module/plugins/hooks/UnRar.py @@ -35,7 +35,7 @@ class UnRar(Hook): __config__ = [ ("activated", "bool", "Activated", False), ("fullpath", "bool", "extract full path", True), ("overwrite", "bool", "overwrite files", True), - ("passwordfile", "str", "unrar passoword file", "unrar_passwords.txt"), + ("passwordfile", "str", "unrar password file", "unrar_passwords.txt"), ("deletearchive", "bool", "delete archives when done", False), ("ramwarning", "bool", "warn about low ram", True), ("renice", "int", "Cpu Priority", 10)] diff --git a/module/plugins/hoster/MegauploadCom.py b/module/plugins/hoster/MegauploadCom.py index 48ca4f920..1cc3c7aaf 100644 --- a/module/plugins/hoster/MegauploadCom.py +++ b/module/plugins/hoster/MegauploadCom.py @@ -7,6 +7,8 @@ from module.plugins.Hoster import Hoster from module.network.Request import getURL +from module.unescape import unescape + def getInfo(urls): url = "http://megaupload.com/mgr_linkcheck.php" @@ -19,7 +21,7 @@ def getInfo(urls): i += 1 api = getURL(url, {}, post) - api = [x.split("&") for x in re.split(r"&?(?=id[\d]+=)", api)] + api = [re.split(r"&(?!amp;|#\d+;)", x) for x in re.split(r"&?(?=id[\d]+=)", api)] result = [] i=0 @@ -35,7 +37,7 @@ def getInfo(urls): else: status = 3 - name = tmp[3][1] + name = unescape(tmp[3][1]) size = tmp[1][1] result.append( (name, size, status, urls[i] ) ) @@ -137,7 +139,7 @@ class MegauploadCom(Hoster): api = self.load(url, {}, post) self.log.debug("MU API: %s" % api) - api = [x.split("&") for x in re.split(r"&?(?=id[\d]+=)", api)] + api = [re.split(r"&(?!amp;|#\d+;)", x) for x in re.split(r"&?(?=id[\d]+=)", api)] for data in api: if data[0].startswith("id"): @@ -145,7 +147,7 @@ class MegauploadCom(Hoster): if tmp[0][1] == "1": self.offline() - name = tmp[3][1] + name = unescape(tmp[3][1]) #size = tmp[1][1] self.api["name"] = name -- cgit v1.2.3