From fd6e286ee089cf75276f2581471aba254d69fcb5 Mon Sep 17 00:00:00 2001
From: cp1 (.*)
"
return re.search(file_name_pattern, self.html).group(1).replace("/", "") + '.flv'
-
+
def file_exists(self):
- """ returns True or False
+ """ returns True or False
"""
if self.html == None:
self.download_html()
diff --git a/Plugins/Plugin.py b/Plugins/Plugin.py
index c58976cd4..c1205e206 100644
--- a/Plugins/Plugin.py
+++ b/Plugins/Plugin.py
@@ -7,7 +7,7 @@ import re
from module.network.Request import Request
class Plugin():
-
+
def __init__(self, parent):
self.parser = ConfigParser.SafeConfigParser()
self.config = {}
@@ -26,23 +26,23 @@ class Plugin():
self.time_plus_wait = 0 #time() + wait in seconds
self.want_reconnect = False
self.multi_dl = True
-
+
def set_parent_status(self):
""" sets all available Statusinfos about a File in self.parent.status
"""
pass
-
+
def download_html(self):
""" gets the url from self.parent.url saves html in self.html and parses
- """
+ """
html = ""
self.html = html
-
+
def file_exists(self):
- """ returns True or False
+ """ returns True or False
"""
return True
-
+
def get_file_url(self):
""" returns the absolute downloadable filepath
"""
@@ -50,12 +50,12 @@ class Plugin():
def get_file_name(self):
return re.findall("([^\/=]+)", self.parent.url)[-1]
-
+
def wait_until(self):
if self.html != None:
self.download_html()
return self.time_plus_wait
-
+
def proceed(self, url, location):
self.req.download(url, location)
@@ -75,4 +75,4 @@ class Plugin():
self.config[option] = False if self.config[option].lower() == 'false' else self.config[option]
def __call__(self):
- return self.props['name']
+ return self.props['name']
\ No newline at end of file
diff --git a/Plugins/RSDF.py b/Plugins/RSDF.py
index 74c07a007..d0ac3ec25 100644
--- a/Plugins/RSDF.py
+++ b/Plugins/RSDF.py
@@ -7,7 +7,7 @@ import binascii
from Plugin import Plugin
class RSDF(Plugin):
-
+
def __init__(self, parent):
Plugin.__init__(self, parent)
props = {}
@@ -22,38 +22,38 @@ class RSDF(Plugin):
self.parent = parent
self.multi_dl = True
self.links = []
-
+
def file_exists(self):
- """ returns True or False
+ """ returns True or False
"""
return True
def proceed(self, url, location):
try:
from Crypto.Cipher import AES
-
+
infile = url.replace("\n", "")
Key = binascii.unhexlify('8C35192D964DC3182C6F84F3252239EB4A320D2500000000')
-
+
IV = binascii.unhexlify('FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF')
IV_Cipher = AES.new(Key, AES.MODE_ECB)
IV = IV_Cipher.encrypt(IV)
-
+
obj = AES.new(Key, AES.MODE_CFB, IV)
-
+
rsdf = open(infile, 'r')
-
+
data = rsdf.read()
data = binascii.unhexlify(''.join(data.split()))
data = data.splitlines()
-
+
for link in data:
link = base64.b64decode(link)
link = obj.decrypt(link)
decryptedUrl = link.replace('CCF: ', '')
self.links.append(decryptedUrl)
-
+
rsdf.close()
-
+
except:
print "Kein Crypto installiert, RSDF Plugin kann nicht genutzt werden"
diff --git a/Plugins/RapidshareCom.py b/Plugins/RapidshareCom.py
index 362c2cf73..f7b981e37 100644
--- a/Plugins/RapidshareCom.py
+++ b/Plugins/RapidshareCom.py
@@ -8,7 +8,7 @@ from time import time
from Plugin import Plugin
class RapidshareCom(Plugin):
-
+
def __init__(self, parent):
Plugin.__init__(self, parent)
props = {}
@@ -41,10 +41,10 @@ class RapidshareCom(Plugin):
self.parent.status.filename = self.get_file_name()
self.parent.status.url = self.get_file_url()
self.parent.status.waituntil = self.wait_until()
-
+
def download_html(self):
""" gets the url from self.parent.url saves html in self.html and parses
- """
+ """
url = self.parent.url
html = self.req.load(url)
self.html[0] = html
@@ -59,7 +59,7 @@ class RapidshareCom(Plugin):
self.download_html()
if self.config['premium']:
- return False
+ return False
file_server_url = re.search(r"
.+/(.+)" return re.search(file_url_pattern, self.html).group(1) else: return False - + def get_file_name(self): if self.html == None: self.download_html() @@ -56,9 +56,9 @@ class UploadedTo(Plugin): return file_name else: return self.parent.url - + def file_exists(self): - """ returns True or False + """ returns True or False """ if self.html == None: self.download_html() @@ -70,4 +70,4 @@ class UploadedTo(Plugin): def wait_until(self): if self.html == None: self.download_html() - return self.time_plus_wait + return self.time_plus_wait \ No newline at end of file diff --git a/Plugins/XupIn.py b/Plugins/XupIn.py index 21bcd3434..0f5c9a8b8 100644 --- a/Plugins/XupIn.py +++ b/Plugins/XupIn.py @@ -4,7 +4,7 @@ import re from Plugin import Plugin class XupIn(Plugin): - + def __init__(self, parent): Plugin.__init__(self, parent) props = {} @@ -23,24 +23,24 @@ class XupIn(Plugin): self.posts = {} self.want_reconnect = None self.multi_dl = False - + def download_html(self): url = self.parent.url self.html = self.req.load(url) self.posts["vid"] = re.search('"hidden" value="(.*)" name="vid"', self.html).group(1) self.posts["vtime"] = re.search('"hidden" value="(.*)" name="vtime"', self.html).group(1) - + def get_file_url(self): """ returns the absolute downloadable filepath """ if self.html == None: self.download_html() - if not self.want_reconnect: + if not self.want_reconnect: file_url_pattern = r".*