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/hoster/MegauploadCom.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster/MegauploadCom.py') 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