summaryrefslogtreecommitdiffstats
path: root/Plugins/RapidshareCom.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2009-05-28 15:31:41 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2009-05-28 15:31:41 +0200
commitc6c9904590e8b184af34cedb38d2f63f2cfff2f4 (patch)
tree0a136a036939ea2aad28aa97f383d2c09cad2639 /Plugins/RapidshareCom.py
parenttime shedule fix (diff)
downloadpyload-c6c9904590e8b184af34cedb38d2f63f2cfff2f4.tar.xz
rapidshare premium support
Diffstat (limited to 'Plugins/RapidshareCom.py')
-rw-r--r--Plugins/RapidshareCom.py27
1 files changed, 20 insertions, 7 deletions
diff --git a/Plugins/RapidshareCom.py b/Plugins/RapidshareCom.py
index 8f774937b..0f4f0528c 100644
--- a/Plugins/RapidshareCom.py
+++ b/Plugins/RapidshareCom.py
@@ -26,6 +26,12 @@ class RapidshareCom(Plugin):
self.time_plus_wait = None #time() + wait in seconds
self.want_reconnect = False
self.multi_dl = False
+
+ self.read_config()
+
+ if self.config['premium']:
+ self.multi_dl = True
+
def set_parent_status(self):
""" sets all available Statusinfos about a File in self.parent.status
@@ -62,6 +68,10 @@ class RapidshareCom(Plugin):
def get_wait_time(self):
+ if self.config['premium'] == "True":
+ self.time_plus_wait = 0
+ return True
+
if self.html[1] == None:
self.download_serverhtml(self)
@@ -94,6 +104,9 @@ class RapidshareCom(Plugin):
def get_file_url(self):
""" returns the absolute downloadable filepath
"""
+ if self.config['premium'] == True:
+ return self.parent.url
+
if self.html[1] == None:
self.download_serverhtml()
if (self.html_old + 5 * 60) < time(): # nach einiger zeit ist die file_url nicht mehr aktuell
@@ -114,10 +127,10 @@ class RapidshareCom(Plugin):
else:
return self.parent.url
- def wait_until(self):
- if self.html == None:
- self.download_html()
- return self.time_plus_wait
-
- def __call__(self):
- return self.props['name']
+ def proceed(self, url, location):
+
+ if self.config['premium'] == True:
+ self.req.add_auth(self.config['user'], self.config['pw'])
+
+
+ self.req.download(url, location)