diff options
Diffstat (limited to 'module/plugins/hoster/MegauploadCom.py')
-rw-r--r-- | module/plugins/hoster/MegauploadCom.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/module/plugins/hoster/MegauploadCom.py b/module/plugins/hoster/MegauploadCom.py index 100553ebf..81d528668 100644 --- a/module/plugins/hoster/MegauploadCom.py +++ b/module/plugins/hoster/MegauploadCom.py @@ -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.28"
+ __version__ = "0.31"
__description__ = """Megaupload.com Download Hoster"""
__author_name__ = ("spoob")
__author_mail__ = ("spoob@pyload.org")
@@ -74,6 +74,7 @@ class MegauploadCom(Hoster): API_STATUS_MAPPING = {"0": statusMap['online'], "1": statusMap['offline'], "3": statusMap['temp. offline']}
FILE_URL_PATTERN = r'<a href="([^"]+)" class="download_regular_usual"'
+ PREMIUM_URL_PATTERN = r'href=\"(http://[^\"]*?)\" class=\"download_premium_but\">'
def init(self):
self.html = [None, None]
@@ -125,12 +126,12 @@ class MegauploadCom(Hoster): if e.args and e.args[0] == 33:
# undirect download and resume , not a good idea
page = self.load(pyfile.url)
- self.download(re.search(r'href=\"(http://[^\"]*?)\" class=\"down_ad_butt1\">', page).group(1))
+ self.download(re.search(self.PREMIUM_URL_PATTERN, page).group(1))
return
else:
raise
- check = self.checkDownload({"dllink": re.compile(r'href=\"(http://[^\"]*?)\" class=\"down_ad_butt1\">')})
+ check = self.checkDownload({"dllink": re.compile(self.PREMIUM_URL_PATTERN)})
if check == "dllink":
self.log.warning(_("You should enable direct Download in your Megaupload Account settings"))
@@ -171,7 +172,7 @@ class MegauploadCom(Hoster): if "The file that you're trying to download is larger than 1 GB" in self.html[0]:
self.fail(_("You need premium to download files larger than 1 GB"))
- if r'Please enter the password below' in self.html[0]:
+ if re.search(r'<input[^>]*name="filepassword"', self.html[0]):
pw = self.getPassword()
if not pw:
self.fail(_("The file is password protected, enter a password and restart."))
@@ -270,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
\ No newline at end of file + return True
|