summaryrefslogtreecommitdiffstats
path: root/module/plugins
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2009-12-04 20:01:17 +0100
committerGravatar mkaay <mkaay@mkaay.de> 2009-12-04 20:01:17 +0100
commit78f061eed59e084f001f8a0cd9c5b585f6fc0ce0 (patch)
tree1c5cc3cbfa4eb993a5af0f2b6556e1ff5f0021c7 /module/plugins
parentConvert read_url_list to new Plugin (diff)
downloadpyload-78f061eed59e084f001f8a0cd9c5b585f6fc0ce0.tar.xz
fixes, minimal gui changes
Diffstat (limited to 'module/plugins')
-rw-r--r--module/plugins/RapidshareCom.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/module/plugins/RapidshareCom.py b/module/plugins/RapidshareCom.py
index 7daff3f8f..f7bcb5de8 100644
--- a/module/plugins/RapidshareCom.py
+++ b/module/plugins/RapidshareCom.py
@@ -27,6 +27,7 @@ class RapidshareCom(Plugin):
self.time_plus_wait = None #time() + wait in seconds
self.want_reconnect = False
self.no_slots = True
+ self.api_data = None
#~ self.logger = logging.getLogger("log")
self.read_config()
if self.config['premium']:
@@ -153,6 +154,8 @@ class RapidshareCom(Plugin):
def file_exists(self):
""" returns True or False
"""
+ if self.html[0] == None:
+ self.download_html()
if re.search("The file could not be found|This limit is reached| \
is momentarily not available|removed this file| \
contain illegal content", self.html[0], re.I) != None:
@@ -190,6 +193,10 @@ class RapidshareCom(Plugin):
#raise Exception, "Error when retrieving download url"
def get_file_name(self):
+ if self.html[0] == None:
+ self.download_html()
+ if self.api_data == None:
+ self.download_api_data()
if self.api_data and self.api_data["filename"]:
return self.api_data["filename"]
file_name_pattern = r"<p class=\"downloadlink\">.+/(.+) <font"