summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-10-06 22:24:17 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-10-06 22:24:17 +0200
commitcac52bbf8b0e928a83a29b744bff20240c8e7354 (patch)
treeb53689d1269f95dfda758879e7206d1c20cb5012 /module/plugins/hoster
parentclosed #147 (diff)
downloadpyload-cac52bbf8b0e928a83a29b744bff20240c8e7354.tar.xz
freakshare premium, closed #146, closed #147
Diffstat (limited to 'module/plugins/hoster')
-rw-r--r--module/plugins/hoster/FreakshareCom.py13
-rw-r--r--module/plugins/hoster/MegauploadCom.py15
-rw-r--r--module/plugins/hoster/RapidshareCom.py4
3 files changed, 22 insertions, 10 deletions
diff --git a/module/plugins/hoster/FreakshareCom.py b/module/plugins/hoster/FreakshareCom.py
index 524081002..bbc22ac98 100644
--- a/module/plugins/hoster/FreakshareCom.py
+++ b/module/plugins/hoster/FreakshareCom.py
@@ -23,10 +23,16 @@ class FreakshareCom(Hoster):
def process(self, pyfile):
pyfile.url = pyfile.url.replace("freakshare.net/","freakshare.com/")
- self.prepare()
- self.get_file_url()
+ if self.account:
+ self.html = self.load(pyfile.url, cookies=False)
+ pyfile.name = self.get_file_name()
+ self.download(pyfile.url)
- self.download(self.pyfile.url, post=self.req_opts)
+ else:
+ self.prepare()
+ self.get_file_url()
+
+ self.download(self.pyfile.url, post=self.req_opts)
def prepare(self):
@@ -48,7 +54,6 @@ class FreakshareCom(Hoster):
return True
def download_html(self):
- url = self.pyfile.url.replace("freakshare.net/","freakshare.com/")
self.html = self.load(url, cookies=True)
def get_file_url(self):
diff --git a/module/plugins/hoster/MegauploadCom.py b/module/plugins/hoster/MegauploadCom.py
index 4c851a5b2..b913976a0 100644
--- a/module/plugins/hoster/MegauploadCom.py
+++ b/module/plugins/hoster/MegauploadCom.py
@@ -76,17 +76,19 @@ class MegauploadCom(Hoster):
pyfile.name = self.get_file_name()
self.download(self.get_file_url())
+ check = self.checkDownload({"limit": "Download limit exceeded"})
+ if check == "limit":
+ wait = self.load("http://www.megaupload.com/?c=premium&l=1")
+ wait = re.search(r"Please wait (\d+) minutes", wait).group(1)
+ self.log.info(_("Megaupload: waiting %d minues") % wait)
+ self.setWait(int(wait)*60, True)
+ self.wait()
+ self.process(pyfile)
else:
self.download_api()
pyfile.name = self.get_file_name()
self.download(pyfile.url)
- check = self.checkDownload({"limit": "Download limit exceeded"}) #@TODO catch it earlier in html pages if possible
- if check == "limit":
- self.setWait(3600, True)
- self.wait()
- self.process(pyfile)
-
def download_html(self):
for i in range(5):
self.html[0] = self.load(self.pyfile.url)
@@ -117,6 +119,7 @@ class MegauploadCom(Hoster):
if re.search(r"Waiting time before each download begins", self.html[1]) is not None:
break
+ print self.html[0]
def download_api(self):
diff --git a/module/plugins/hoster/RapidshareCom.py b/module/plugins/hoster/RapidshareCom.py
index 40fe05eeb..0e3d2e74d 100644
--- a/module/plugins/hoster/RapidshareCom.py
+++ b/module/plugins/hoster/RapidshareCom.py
@@ -212,6 +212,10 @@ class RapidshareCom(Hoster):
self.setWait(60)
self.log.info(_("Already downloading from this ip address, waiting 60 seconds"))
self.wait()
+ elif "Too many users downloading from this server right now" in result:
+ self.setWait(120)
+ self.log.info(_("RapidShareCom: No free slots"))
+ self.wait()
elif between_wait:
self.setWait(int(between_wait.group(1)))
self.wantReconnect = True