diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-10-26 16:42:52 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-10-26 16:42:52 +0200 |
commit | 9f1e50de4a446d6661fb6b89f058c8f2fd319e68 (patch) | |
tree | 7baf47b107fb8a9d145009319707afa1023255de /module/plugins/hoster/MegauploadCom.py | |
parent | process renice (diff) | |
download | pyload-9f1e50de4a446d6661fb6b89f058c8f2fd319e68.tar.xz |
Diffstat (limited to 'module/plugins/hoster/MegauploadCom.py')
-rw-r--r-- | module/plugins/hoster/MegauploadCom.py | 10 |
1 files changed, 6 insertions, 4 deletions
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 |