diff options
Diffstat (limited to 'module/plugins/hoster')
| -rw-r--r-- | module/plugins/hoster/MegauploadCom.py | 10 | 
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 | 
