summaryrefslogtreecommitdiffstats
path: root/module/plugins/container/RSDF.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/container/RSDF.py')
-rw-r--r--module/plugins/container/RSDF.py24
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))