summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/MegauploadCom.py
diff options
context:
space:
mode:
authorGravatar Jeix <devnull@localhost> 2010-12-01 19:19:48 +0100
committerGravatar Jeix <devnull@localhost> 2010-12-01 19:19:48 +0100
commit8922d93070ae079a02e14e60b6ac20da64fc23d3 (patch)
tree351205d95835fb3bf59a7e49091b69223d15c028 /module/plugins/hoster/MegauploadCom.py
parentcorrect invalid DLCs (diff)
downloadpyload-8922d93070ae079a02e14e60b6ac20da64fc23d3.tar.xz
fixed Megaupload, added Uploading.com beta, closed #177 #182
Diffstat (limited to 'module/plugins/hoster/MegauploadCom.py')
-rw-r--r--module/plugins/hoster/MegauploadCom.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/module/plugins/hoster/MegauploadCom.py b/module/plugins/hoster/MegauploadCom.py
index 45711191e..92daedec2 100644
--- a/module/plugins/hoster/MegauploadCom.py
+++ b/module/plugins/hoster/MegauploadCom.py
@@ -101,8 +101,9 @@ class MegauploadCom(Hoster):
self.download(pyfile.url)
def download_html(self):
- for i in range(5):
+ for i in range(3):
self.html[0] = self.load(self.pyfile.url)
+ self.html[1] = self.html[0] # in case of no captcha, this already contains waiting time, etc
count = 0
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"))
@@ -165,7 +166,7 @@ class MegauploadCom(Hoster):
def get_file_url(self):
- file_url_pattern = 'id="downloadlink"><a href="(.*)" onclick="'
+ file_url_pattern = 'id="downloadlink"><a href="(.*)"\s+(?:onclick|class)="'
search = re.search(file_url_pattern, self.html[1])
return search.group(1).replace(" ", "%20")