diff options
author | cp1 <christopherpool1@googlemail.com> | 2009-06-11 16:50:48 +0200 |
---|---|---|
committer | cp1 <christopherpool1@googlemail.com> | 2009-06-11 16:50:48 +0200 |
commit | fd6e286ee089cf75276f2581471aba254d69fcb5 (patch) | |
tree | 1f91e2063f3182d172d7c7f70c4fdb98b407a60b /Plugins | |
parent | add wxversion selector to ensure wxWidgets 2.8 is used (diff) | |
download | pyload-fd6e286ee089cf75276f2581471aba254d69fcb5.tar.xz |
correcting false identation (tabs to spaces)
Diffstat (limited to 'Plugins')
-rw-r--r-- | Plugins/BluehostTo.py | 6 | ||||
-rw-r--r-- | Plugins/CCF.py | 2 | ||||
-rw-r--r-- | Plugins/MyvideoDe.py | 14 | ||||
-rw-r--r-- | Plugins/Plugin.py | 20 | ||||
-rw-r--r-- | Plugins/RSDF.py | 22 | ||||
-rw-r--r-- | Plugins/RapidshareCom.py | 26 | ||||
-rw-r--r-- | Plugins/ShragleCom.py | 2 | ||||
-rw-r--r-- | Plugins/UploadedTo.py | 16 | ||||
-rw-r--r-- | Plugins/XupIn.py | 14 | ||||
-rw-r--r-- | Plugins/YoupornCom.py | 26 | ||||
-rw-r--r-- | Plugins/YoutubeCom.py | 16 | ||||
-rw-r--r-- | Plugins/ZippyshareCom.py | 14 | ||||
-rw-r--r-- | Plugins/ZshareNet.py | 14 |
13 files changed, 96 insertions, 96 deletions
diff --git a/Plugins/BluehostTo.py b/Plugins/BluehostTo.py index d7f9f1e81..c099d792f 100644 --- a/Plugins/BluehostTo.py +++ b/Plugins/BluehostTo.py @@ -20,7 +20,7 @@ class BluehostTo(Plugin): self.parent = parent self.html = None self.multi_dl = False - + def download_html(self): url = self.parent.url self.html = self.req.load(url) @@ -33,7 +33,7 @@ class BluehostTo(Plugin): """ if self.html == None: self.download_html() - + inputs = re.findall(r"(<(input|form)[^>]+)", self.html) for i in inputs: if re.search(r"name=\"BluehostVers2dl\"",i[0]): @@ -67,4 +67,4 @@ class BluehostTo(Plugin): return True def proceed(self, url, location): - self.req.download(url, location, {'BluehostVers2dl': self.BluehostVers2dl, 'DownloadV2Hash': self.DownloadV2Hash, 'PHPSESSID': self.PHPSESSID, 'access': self.access}) + self.req.download(url, location, {'BluehostVers2dl': self.BluehostVers2dl, 'DownloadV2Hash': self.DownloadV2Hash, 'PHPSESSID': self.PHPSESSID, 'access': self.access})
\ No newline at end of file diff --git a/Plugins/CCF.py b/Plugins/CCF.py index e583bfbb3..990e6a2ca 100644 --- a/Plugins/CCF.py +++ b/Plugins/CCF.py @@ -57,4 +57,4 @@ class CCF(Plugin): self.links.append(tempdlc_name) - return True + return True
\ No newline at end of file diff --git a/Plugins/MyvideoDe.py b/Plugins/MyvideoDe.py index 762cd77e0..b4427f0fc 100644 --- a/Plugins/MyvideoDe.py +++ b/Plugins/MyvideoDe.py @@ -4,7 +4,7 @@ import re from Plugin import Plugin class MyvideoDe(Plugin): - + def __init__(self, parent): Plugin.__init__(self, parent) props = {} @@ -19,7 +19,7 @@ class MyvideoDe(Plugin): self.parent = parent self.html = None self.html_old = None #time() where loaded the HTML - self.time_plus_wait = None #time() + wait in seconds + self.time_plus_wait = None #time() + wait in seconds def set_parent_status(self): """ sets all available Statusinfos about a File in self.parent.status @@ -29,11 +29,11 @@ class MyvideoDe(Plugin): self.parent.status.filename = self.get_file_name() self.parent.status.url = self.get_file_url() self.parent.status.wait = self.wait_until() - + def download_html(self): url = self.parent.url self.html = self.req.load(url) - + def get_file_url(self): """ returns the absolute downloadable filepath """ @@ -46,15 +46,15 @@ class MyvideoDe(Plugin): print videoServer print file_url return file_url - + def get_file_name(self): if self.html == None: self.download_html() file_name_pattern = r"<h1 class='globalHd'>(.*)</h1>" 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"<form action=\"(.*?)\"", self.html[0]).group(1) #free user @@ -67,7 +67,7 @@ class RapidshareCom(Plugin): self.html[1] = self.req.load(file_server_url, None, {"dl.start": "Free"}) self.html_old = time() self.get_wait_time() - + def get_wait_time(self): if self.config['premium']: @@ -76,7 +76,7 @@ class RapidshareCom(Plugin): if self.html[1] == None: self.download_serverhtml(self) - + if re.search(r".*is already downloading.*", self.html[1]) != None: self.time_plus_wait = time() + 10 * 60 try: @@ -88,9 +88,9 @@ class RapidshareCom(Plugin): self.time_plus_wait = time() + 2 * 60 wait_seconds = re.search(r"var c=(.*);.*", self.html[1]).group(1) self.time_plus_wait = time() + int(wait_seconds) + 5 - + def file_exists(self): - """ returns True or False + """ returns True or False """ if self.html[0] == None: self.download_html() @@ -98,8 +98,8 @@ class RapidshareCom(Plugin): re.search(r"(<p>This limit is reached.</p>)", self.html[0]) or \ re.search(r"(.*is momentarily not available.*)", self.html[0]) or \ re.search(r"(.*The uploader has removed this file from the server.*)", self.html[0]) or \ - re.search(r"(.*This file is suspected to contain illegal content.*)", self.html[0]): - return False + re.search(r"(.*This file is suspected to contain illegal content.*)", self.html[0]): + return False else: return True @@ -120,17 +120,17 @@ class RapidshareCom(Plugin): return re.search(file_url_pattern, self.html[1]).group(1) else: return False - + def get_file_name(self): if self.html[0] == None: self.download_html() file_name_pattern = r"<p class=\"downloadlink\">.+/(.+)<font" return re.findall(file_name_pattern, self.html[0])[0] - + def proceed(self, url, location): if self.config['premium']: self.req.add_auth(self.config['username'], self.config['password']) - self.req.download(url, location) + self.req.download(url, location)
\ No newline at end of file diff --git a/Plugins/ShragleCom.py b/Plugins/ShragleCom.py index 45f416872..3cd093ce2 100644 --- a/Plugins/ShragleCom.py +++ b/Plugins/ShragleCom.py @@ -60,7 +60,7 @@ class ShragleCom(Plugin): """ if self.html == None: self.download_html() - + if re.search(r"html", self.html) == None: return False else: diff --git a/Plugins/UploadedTo.py b/Plugins/UploadedTo.py index 67c8685fa..edb39ab45 100644 --- a/Plugins/UploadedTo.py +++ b/Plugins/UploadedTo.py @@ -5,7 +5,7 @@ from time import time from Plugin import Plugin class UploadedTo(Plugin): - + def __init__(self, parent): Plugin.__init__(self, parent) props = {} @@ -23,7 +23,7 @@ class UploadedTo(Plugin): self.time_plus_wait = None #time() + wait in seconds self.want_reconnect = None self.multi_dl = False - + def download_html(self): url = self.parent.url self.html = self.req.load(url) @@ -34,18 +34,18 @@ class UploadedTo(Plugin): self.want_reconnect = True except: self.time_plus_wait = 0 - + 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".*<form name=\"download_form\" method=\"post\" action=\"(.*)\">" 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".*<form action=\"(.*)\" method=\"post\">" 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() @@ -48,9 +48,9 @@ class XupIn(Plugin): return self.parent.url.split('/')[-2] else: return self.parent.url - + def file_exists(self): - """ returns True or False + """ returns True or False """ if self.html == None: self.download_html() diff --git a/Plugins/YoupornCom.py b/Plugins/YoupornCom.py index 08223bea5..20f8ed95c 100644 --- a/Plugins/YoupornCom.py +++ b/Plugins/YoupornCom.py @@ -4,13 +4,13 @@ import re from Plugin import Plugin class YoupornCom(Plugin): - + def __init__(self, parent): Plugin.__init__(self, parent) props = {} props['name'] = "YoupornCom" props['type'] = "hoster" - props['pattern'] = r"http://(www\.)?youporn\.com/watch/.+" + props['pattern'] = r"http://(www\.)?youporn\.com/watch/.+" props['version'] = "0.1" props['description'] = """Youporn.com Video Download Plugin""" props['author_name'] = ("willnix") @@ -20,7 +20,7 @@ class YoupornCom(Plugin): self.html = None self.html_old = None #time() where loaded the HTML self.time_plus_wait = None #time() + wait in seconds - + def set_parent_status(self): """ sets all available Statusinfos about a File in self.parent.status """ @@ -29,11 +29,11 @@ class YoupornCom(Plugin): self.parent.status.filename = self.get_file_name() self.parent.status.url = self.get_file_url() self.parent.status.wait = self.wait_until() - + def download_html(self): url = self.parent.url self.html = self.req.load(url) - + def get_file_url(self): """ returns the absolute downloadable filepath """ @@ -41,21 +41,21 @@ class YoupornCom(Plugin): self.download_html() file_url = re.search(r'(http://download.youporn.com/download/\d*/.*\?download=1&ll=1&t=dd)">', self.html).group(1) - print file_url - return file_url - + print file_url + return file_url + def get_file_name(self): if self.html == None: self.download_html() - file_name_pattern = r".*<title>(.*) - Free Porn Videos - YouPorn.com Lite \(BETA\)</title>.*" - return re.search(file_name_pattern, self.html).group(1) + '.flv' - + file_name_pattern = r".*<title>(.*) - Free Porn Videos - YouPorn.com Lite \(BETA\)</title>.*" + return re.search(file_name_pattern, self.html).group(1) + '.flv' + def file_exists(self): - """ returns True or False + """ returns True or False """ if self.html == None: self.download_html() if re.search(r"(.*invalid video_id.*)", self.html) != None: return False else: - return True + return True
\ No newline at end of file diff --git a/Plugins/YoutubeCom.py b/Plugins/YoutubeCom.py index 2d8567a28..2a8315ad5 100644 --- a/Plugins/YoutubeCom.py +++ b/Plugins/YoutubeCom.py @@ -4,7 +4,7 @@ import re from Plugin import Plugin class YoutubeCom(Plugin): - + def __init__(self, parent): Plugin.__init__(self, parent) props = {} @@ -19,11 +19,11 @@ class YoutubeCom(Plugin): self.parent = parent self.html = None self.read_config() - + def download_html(self): url = self.parent.url self.html = self.req.load(url) - + def get_file_url(self): """ returns the absolute downloadable filepath """ @@ -37,23 +37,23 @@ class YoutubeCom(Plugin): quality = "&fmt=18" file_url = 'http://youtube.com/get_video?video_id=' + videoId + '&t=' + videoHash + quality return file_url - + def get_file_name(self): if self.html == None: self.download_html() - + file_name_pattern = r"<title>YouTube - (.*)</title>" file_suffix = ".flv" if self.config['high_quality']: file_suffix = ".mp4" return re.search(file_name_pattern, self.html).group(1).replace("/", "") + file_suffix - + def file_exists(self): - """ returns True or False + """ returns True or False """ if self.html == None: self.download_html() if re.search(r"(.*eine fehlerhafte Video-ID\.)", self.html) != None: return False else: - return True + return True
\ No newline at end of file diff --git a/Plugins/ZippyshareCom.py b/Plugins/ZippyshareCom.py index 59bce0623..d0f27fd53 100644 --- a/Plugins/ZippyshareCom.py +++ b/Plugins/ZippyshareCom.py @@ -6,7 +6,7 @@ from time import time from Plugin import Plugin class ZippyshareCom(Plugin): - + def __init__(self, parent): Plugin.__init__(self, parent) props = {} @@ -22,12 +22,12 @@ class ZippyshareCom(Plugin): self.html = None self.want_reconnect = False self.multi_dl = False - + def download_html(self): url = self.parent.url self.html = self.req.load(url) self.time_plus_wait = time() + 12 - + def get_file_url(self): """ returns the absolute downloadable filepath """ @@ -38,7 +38,7 @@ class ZippyshareCom(Plugin): return file_url else: return False - + def get_file_name(self): if self.html == None: self.download_html() @@ -48,13 +48,13 @@ class ZippyshareCom(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() if re.search(r"HTTP Status 404", self.html) != None: return False else: - return True + return True
\ No newline at end of file diff --git a/Plugins/ZshareNet.py b/Plugins/ZshareNet.py index 0979e88c7..1701387ce 100644 --- a/Plugins/ZshareNet.py +++ b/Plugins/ZshareNet.py @@ -4,7 +4,7 @@ import re from Plugin import Plugin class ZshareNet(Plugin): - + def __init__(self, parent): Plugin.__init__(self, parent) props = {} @@ -23,7 +23,7 @@ class ZshareNet(Plugin): self.posts = {} self.want_reconnect = False self.multi_dl = False - + def download_html(self): url = self.parent.url self.html[0] = self.req.load(url) @@ -34,7 +34,7 @@ class ZshareNet(Plugin): elif "/image/" in url: url = url.replace("/image/", "/download/") self.html[1] = self.req.load(url, None, {"download": "1"}) - + def get_file_url(self): """ returns the absolute downloadable filepath """ @@ -45,7 +45,7 @@ class ZshareNet(Plugin): return file_url else: return False - + def get_file_name(self): if self.html[0] == None: self.download_html() @@ -54,9 +54,9 @@ class ZshareNet(Plugin): return file_name else: return self.parent.url - + def file_exists(self): - """ returns True or False + """ returns True or False """ if self.html[0] == None: self.download_html() @@ -68,4 +68,4 @@ class ZshareNet(Plugin): def wait_until(self): if self.html[0] == None: self.download_html() - return self.time_plus_wait + return self.time_plus_wait
\ No newline at end of file |