summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar spoob <spoob@gmx.de> 2009-09-03 21:46:13 +0200
committerGravatar spoob <spoob@gmx.de> 2009-09-03 21:46:13 +0200
commit2ed8bf528418d3ad95ab8e63c72e21837ea47ef9 (patch)
tree48cbb963b2c64818b5104cf81d310b10c0e09a19
parentFixed #24 (diff)
downloadpyload-2ed8bf528418d3ad95ab8e63c72e21837ea47ef9.tar.xz
Netload Premium Test
-rw-r--r--Plugins/NetloadIn.py8
-rw-r--r--Plugins/RapidshareCom.py18
-rwxr-xr-xmodule/network/Request.py1
-rw-r--r--pluginconfig11
4 files changed, 25 insertions, 13 deletions
diff --git a/Plugins/NetloadIn.py b/Plugins/NetloadIn.py
index 39ea9213e..8bff067de 100644
--- a/Plugins/NetloadIn.py
+++ b/Plugins/NetloadIn.py
@@ -46,6 +46,10 @@ class NetloadIn(Plugin):
raise Exception, "The file was not found on the server."
pyfile.status.filename = self.get_file_name()
+
+ if self.config['premium']:
+ pyfile.status.url = self.parent.url
+ return True
self.download_html2()
@@ -135,4 +139,8 @@ class NetloadIn(Plugin):
return True
def proceed(self, url, location):
+
+ if self.config['premium']:
+ self.req.add_auth(self.config['username'], self.config['password'])
+
self.req.download(url, location, cookies=True)
diff --git a/Plugins/RapidshareCom.py b/Plugins/RapidshareCom.py
index a81affd90..731554f87 100644
--- a/Plugins/RapidshareCom.py
+++ b/Plugins/RapidshareCom.py
@@ -45,12 +45,16 @@ class RapidshareCom(Plugin):
self.download_html()
- pyfile.status.filename = self.get_file_name()
-
pyfile.status.exists = self.file_exists()
-
+
if not pyfile.status.exists:
raise Exception, "The file was not found on the server."
+
+ pyfile.status.filename = self.get_file_name()
+
+ if self.config['premium']:
+ pyfile.status.url = self.parent.url
+ return True
self.download_serverhtml()
pyfile.status.waituntil = self.time_plus_wait
@@ -78,10 +82,6 @@ class RapidshareCom(Plugin):
def download_serverhtml(self):
"""downloads html with the important informations
"""
-
- if self.config['premium']:
- return False
-
file_server_url = re.search(r"<form action=\"(.*?)\"", self.html[0]).group(1)
self.html[1] = self.req.load(file_server_url, None, {"dl.start": "Free"})
self.html_old = time()
@@ -89,10 +89,6 @@ class RapidshareCom(Plugin):
def get_wait_time(self):
- if self.config['premium']:
- self.time_plus_wait = 0
- return True
-
if re.search(r".*is already downloading.*", self.html[1]) != None:
self.time_plus_wait = time() + 10 * 60
try:
diff --git a/module/network/Request.py b/module/network/Request.py
index 084c84f95..b2bac2d7b 100755
--- a/module/network/Request.py
+++ b/module/network/Request.py
@@ -244,6 +244,7 @@ class Request:
if "..." in file_name:
download_folder = dirname(file_name) + sep
headers = self.get_header()
+ print headers
file_name_search = re.search('filename=(?P<quote>\")?(.+)(?(quote)\")', headers)
if file_name_search:
file_name = file_name_search.group(2)
diff --git a/pluginconfig b/pluginconfig
index 4963d856b..856a1fddc 100644
--- a/pluginconfig
+++ b/pluginconfig
@@ -2,10 +2,17 @@
#select server, empty for automatic, else Cogent, Deutsche Telekom, Level(3), Level(3) #2, GlobalCrossing, Level(3) #3, Teleglobe, GlobalCrossing #2, TeliaSonera #2, Teleglobe #2, TeliaSonera #3, TeliaSonera
server = ""
premium = False
-username = name
-password = pw
+username = namehere
+password = passhere
+
+[NetloadIn]
+premium = False
+username = namehere
+password = passhere
+
[YoutubeCom]
high_quality = True
+
[YoutubeChannel]
#type False for no limitation
max_videos = False