summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster
diff options
context:
space:
mode:
authorGravatar zoidberg10 <zoidberg@mujmail.cz> 2011-12-01 21:45:11 +0100
committerGravatar zoidberg10 <zoidberg@mujmail.cz> 2011-12-01 21:45:11 +0100
commitf5224f7a581eb5750a6ab9de2302ed749fb77540 (patch)
tree58078b3de04ce812b200e20157a3ab9351208748 /module/plugins/hoster
parentupdate hellspy.cz, add bayfiles.com (diff)
downloadpyload-f5224f7a581eb5750a6ab9de2302ed749fb77540.tar.xz
megaupload decode file info, megaupload/depositfiles folders
Diffstat (limited to 'module/plugins/hoster')
-rw-r--r--module/plugins/hoster/MegauploadCom.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/module/plugins/hoster/MegauploadCom.py b/module/plugins/hoster/MegauploadCom.py
index 4854dcef7..87ac3f7f9 100644
--- a/module/plugins/hoster/MegauploadCom.py
+++ b/module/plugins/hoster/MegauploadCom.py
@@ -25,7 +25,7 @@ def getInfo(urls):
fileIds.append(match.group("id"))
for i, fileId in enumerate(fileIds):
post["id%i" % i] = fileId
- response = getURL(MegauploadCom.API_URL, post=post)
+ response = getURL(MegauploadCom.API_URL, post=post, decode = True)
# Process API response
parts = [re.split(r"&(?!amp;|#\d+;)", x) for x in re.split(r"&?(?=id[\d]+=)", response)]
@@ -53,7 +53,7 @@ def _translateAPIFileInfo(apiFileId, apiFileDataMap, apiHosterMap):
fileInfo = {}
try:
fileInfo['status'] = MegauploadCom.API_STATUS_MAPPING[apiFileDataMap[apiFileId]]
- fileInfo['name'] = apiFileDataMap['n']
+ fileInfo['name'] = html_unescape(apiFileDataMap['n'])
fileInfo['size'] = int(apiFileDataMap['s'])
fileInfo['hoster'] = apiHosterMap[apiFileDataMap['d']]
except:
@@ -65,7 +65,7 @@ class MegauploadCom(Hoster):
__name__ = "MegauploadCom"
__type__ = "hoster"
__pattern__ = r"http://[\w\.]*?(megaupload)\.com/.*?(\?|&)d=(?P<id>[0-9A-Za-z]+)"
- __version__ = "0.26"
+ __version__ = "0.27"
__description__ = """Megaupload.com Download Hoster"""
__author_name__ = ("spoob")
__author_mail__ = ("spoob@pyload.org")
@@ -211,7 +211,7 @@ class MegauploadCom(Hoster):
fileId = self.pyfile.url.split("=")[-1] # Get file id from url
apiFileId = "id0"
post = {apiFileId: fileId}
- response = getURL(self.API_URL, post=post)
+ response = getURL(self.API_URL, post=post, decode = True)
self.log.debug("%s: API response [%s]" % (self.__name__, response))
# Translate API response
@@ -271,4 +271,4 @@ class MegauploadCom(Hoster):
if re.search("The password you have entered is not correct", self.html[1]):
self.fail(_("Wrong password for download link."))
- return True
+ return True \ No newline at end of file