summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar spoob <spoob@gmx.de> 2009-05-28 23:15:10 +0200
committerGravatar spoob <spoob@gmx.de> 2009-05-28 23:15:10 +0200
commita1057b7cb56c45b5086d9c7bcdac2cbec1d508b2 (patch)
tree8942dbbbc72108c0892b0db941cffe2fb191c084
parentrapidshare premium fix (diff)
downloadpyload-a1057b7cb56c45b5086d9c7bcdac2cbec1d508b2.tar.xz
premium and free download works with rapidshare
-rw-r--r--Core.py3
-rw-r--r--Plugins/Plugin.py12
-rw-r--r--Plugins/RapidshareCom.py15
-rw-r--r--pluginconfig6
4 files changed, 14 insertions, 22 deletions
diff --git a/Core.py b/Core.py
index 5f194fdc3..a314c0a03 100644
--- a/Core.py
+++ b/Core.py
@@ -199,9 +199,6 @@ class Core(object):
#@todo: doesnt work at the moment
hour, minute = time.localtime()[3:5]
- print start_h, start_m, end_h, end_m
- print hour, minute
-
if hour > int(start_h) and hour < int(end_h):
return True
elif hour == int(start_h) and minute >= int(start_m):
diff --git a/Plugins/Plugin.py b/Plugins/Plugin.py
index 7b7bd1d7e..28de69928 100644
--- a/Plugins/Plugin.py
+++ b/Plugins/Plugin.py
@@ -9,18 +9,17 @@ from module.network.Request import Request
class Plugin():
def __init__(self, parent):
- self.plugin_name = "Base"
- self.plugin_pattern = None
- self.plugin_type = "hoster"
self.parser = ConfigParser.SafeConfigParser()
self.config = {}
props = {}
props['name'] = "Base Plugin"
+ props['pattern'] = None
+ props['type'] = "hoster"
props['version'] = "0.1"
props['format'] = "*.py"
props['description'] = """bla"""
- props['author'] = "Spoob"
- props['author_email'] = "nn@nn.de"
+ props['author_name'] = ("RaNaN", "spoob")
+ props['author_mail'] = ("RaNaN@pyload.org", "spoob@pyload.org")
self.props = props
self.parent = parent
self.req = Request()
@@ -50,7 +49,6 @@ class Plugin():
"""
return self.parent.url
-
def get_file_name(self):
return re.findall("([^\/=]+)", self.parent.url)[-1]
@@ -74,7 +72,7 @@ class Plugin():
if self.parser.has_section(self.props['name']):
for option in self.parser.options(self.props['name']):
- self.config[option] = self.parser.get(self.props['name'], option)
+ self.config[option] = self.parser.get(self.props['name'], option, raw=True)
def __call__(self):
return self.props['name']
diff --git a/Plugins/RapidshareCom.py b/Plugins/RapidshareCom.py
index df746cc3b..3af2333c8 100644
--- a/Plugins/RapidshareCom.py
+++ b/Plugins/RapidshareCom.py
@@ -28,10 +28,9 @@ class RapidshareCom(Plugin):
self.multi_dl = False
self.read_config()
-
- if bool(self.config['premium']):
+ if self.config['premium'] == "True":
self.multi_dl = True
-
+
def set_parent_status(self):
""" sets all available Statusinfos about a File in self.parent.status
"""
@@ -64,10 +63,9 @@ class RapidshareCom(Plugin):
self.html_old = time()
self.get_wait_time()
-
def get_wait_time(self):
- if bool(self.config['premium']):
+ if self.config['premium'] == "True":
self.time_plus_wait = 0
return True
@@ -103,7 +101,7 @@ class RapidshareCom(Plugin):
def get_file_url(self):
""" returns the absolute downloadable filepath
"""
- if bool(self.config['premium']):
+ if self.config['premium'] == "True":
return self.parent.url
if self.html[1] == None:
@@ -128,8 +126,7 @@ class RapidshareCom(Plugin):
def proceed(self, url, location):
- if bool(self.config['premium']):
- self.req.add_auth(self.config['user'], self.config['pw'])
-
+ if self.config['premium'] == "True":
+ self.req.add_auth(self.config['username'], self.config['password'])
self.req.download(url, location)
diff --git a/pluginconfig b/pluginconfig
index 72aaf1de2..eac984aff 100644
--- a/pluginconfig
+++ b/pluginconfig
@@ -1,4 +1,4 @@
[RapidshareCom]
-premium = True
-user = 8732085
-pw = yEEaKRC6 \ No newline at end of file
+premium = False
+username = ""
+password = ""