summaryrefslogtreecommitdiffstats
path: root/module/plugins/crypter/EmbeduploadCom.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/crypter/EmbeduploadCom.py')
-rw-r--r--module/plugins/crypter/EmbeduploadCom.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/module/plugins/crypter/EmbeduploadCom.py b/module/plugins/crypter/EmbeduploadCom.py
index 6126527a9..823e3f25f 100644
--- a/module/plugins/crypter/EmbeduploadCom.py
+++ b/module/plugins/crypter/EmbeduploadCom.py
@@ -24,7 +24,6 @@ class EmbeduploadCom(Crypter):
def decrypt(self, pyfile):
self.html = self.load(pyfile.url, decode=True)
tmp_links = []
- new_links = []
found = re.findall(self.LINK_PATTERN, self.html)
if found:
@@ -32,21 +31,20 @@ class EmbeduploadCom(Crypter):
prefered_set = map(lambda s: s.lower().split('.')[0], prefered_set)
print "PF", prefered_set
tmp_links.extend([x[1] for x in found if x[0] in prefered_set])
- self.getLocation(tmp_links, new_links)
+ self.urls = self.getLocation(tmp_links)
- if not new_links:
+ if not self.urls:
ignored_set = set(self.getConfig("ignoredHoster").split('|'))
ignored_set = map(lambda s: s.lower().split('.')[0], ignored_set)
print "IG", ignored_set
tmp_links.extend([x[1] for x in found if x[0] not in ignored_set])
- self.getLocation(tmp_links, new_links)
+ self.urls = self.getLocation(tmp_links)
- if new_links:
- self.core.files.addLinks(new_links, pyfile.package().id)
- else:
+ if not self.urls:
self.fail('Could not extract any links')
- def getLocation(self, tmp_links, new_links):
+ def getLocation(self, tmp_links):
+ new_links = []
for link in tmp_links:
try:
header = self.load(link, just_header=True)
@@ -54,3 +52,4 @@ class EmbeduploadCom(Crypter):
new_links.append(header['location'])
except BadHeader:
pass
+ return new_links