summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar spoob <spoob@gmx.de> 2009-05-19 15:24:27 +0200
committerGravatar spoob <spoob@gmx.de> 2009-05-19 15:24:27 +0200
commite9d9a08b3b328b1c0695d8880849a19e68e19eb5 (patch)
tree1249b26a0bb86d3796cc337ac6fd58d226b861d8
parentUploadedTo funktioniert jetzt auch. Wartezeit wird auch berücksichigt. (diff)
downloadpyload-e9d9a08b3b328b1c0695d8880849a19e68e19eb5.tar.xz
rapidshare waits
-rw-r--r--Plugins/RapidshareCom.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Plugins/RapidshareCom.py b/Plugins/RapidshareCom.py
index 586fa0157..e075ecfc7 100644
--- a/Plugins/RapidshareCom.py
+++ b/Plugins/RapidshareCom.py
@@ -46,7 +46,10 @@ class RapidshareCom(Plugin):
html = urllib2.urlopen(url).read()
self.html = html
self.html_old = time()
+
+ def get_wait_time(self):
file_server_url = re.search(r"<form action=\"(.*?)\"", self.html).group(1)
+ #free user
free_user_encode = urllib.urlencode({"dl.start" : "Free"})
self.html = urllib2.urlopen(file_server_url, free_user_encode).read()
if re.search(r".*is already downloading.*", self.html) != None:
@@ -77,6 +80,7 @@ class RapidshareCom(Plugin):
def get_file_url(self):
""" returns the absolute downloadable filepath
"""
+ se.get_wait_time()
if self.html == None:
self.download_html()
if (self.html_old + 5*60) > time(): # nach einiger zeit ist die file_url nicht mehr aktuell