diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-06-12 13:13:20 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-06-12 13:13:20 +0200 |
commit | 6a86b735fb9723239f4d109e2a2985b7782807dc (patch) | |
tree | eca7ced4fb3dd300611fc831c0eccb9a5536a64c /module/plugins/container | |
parent | comment out filemanager (diff) | |
download | pyload-6a86b735fb9723239f4d109e2a2985b7782807dc.tar.xz |
erniebs fixes, ul lifetime fix
Diffstat (limited to 'module/plugins/container')
-rw-r--r-- | module/plugins/container/RSDF.py | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/module/plugins/container/RSDF.py b/module/plugins/container/RSDF.py index 93e2d717b..ea5cd67f2 100644 --- a/module/plugins/container/RSDF.py +++ b/module/plugins/container/RSDF.py @@ -3,6 +3,7 @@ import base64 import binascii +import re from module.plugins.Container import Container @@ -31,17 +32,18 @@ class RSDF(Container): rsdf = open(infile, 'r') data = rsdf.read() - data = binascii.unhexlify(''.join(data.split())) - data = data.splitlines() + rsdf.close() - links = [] - for link in data: - link = base64.b64decode(link) - link = obj.decrypt(link) - decryptedUrl = link.replace('CCF: ', '') - links.append(decryptedUrl) + if re.search(r"<title>404 - Not Found</title>", data) is None: + data = binascii.unhexlify(''.join(data.split())) + data = data.splitlines() - rsdf.close() + links = [] + for link in data: + link = base64.b64decode(link) + link = obj.decrypt(link) + decryptedUrl = link.replace('CCF: ', '') + links.append(decryptedUrl) - self.log.debug("%s: adding package %s with %d links" % (self.__name__,pyfile.package().name,len(links))) - self.packages.append((pyfile.package().name, links)) + self.log.debug("%s: adding package %s with %d links" % (self.__name__,pyfile.package().name,len(links))) + self.packages.append((pyfile.package().name, links)) |