summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/crypter/EmbeduploadCom.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/plugins/crypter/EmbeduploadCom.py')
-rw-r--r--pyload/plugins/crypter/EmbeduploadCom.py27
1 files changed, 16 insertions, 11 deletions
diff --git a/pyload/plugins/crypter/EmbeduploadCom.py b/pyload/plugins/crypter/EmbeduploadCom.py
index 5d9369d9d..136d99f9e 100644
--- a/pyload/plugins/crypter/EmbeduploadCom.py
+++ b/pyload/plugins/crypter/EmbeduploadCom.py
@@ -6,16 +6,19 @@ from pyload.network.HTTPRequest import BadHeader
class EmbeduploadCom(Crypter):
- __name__ = "EmbeduploadCom"
- __type__ = "crypter"
+ __name__ = "EmbeduploadCom"
+ __type__ = "crypter"
__version__ = "0.02"
- __pattern__ = r'http://(?:www\.)?embedupload.com/\?d=.*'
- __config__ = [("preferedHoster", "str", "Prefered hoster list (bar-separated) ", "embedupload"),
- ("ignoredHoster", "str", "Ignored hoster list (bar-separated) ", "")]
+ __pattern__ = r'http://(?:www\.)?embedupload\.com/\?d=.*'
+ __config__ = [("use_subfolder", "bool", "Save package to subfolder", True),
+ ("subfolder_per_package", "bool", "Create a subfolder for each package", True),
+ ("preferedHoster", "str", "Prefered hoster list (bar-separated)", "embedupload"),
+ ("ignoredHoster", "str", "Ignored hoster list (bar-separated)", "")]
__description__ = """EmbedUpload.com decrypter plugin"""
- __authors__ = [("zoidberg", "zoidberg@mujmail.cz")]
+ __license__ = "GPLv3"
+ __authors__ = [("zoidberg", "zoidberg@mujmail.cz")]
LINK_PATTERN = r'<div id="([^"]+)"[^>]*>\s*<a href="([^"]+)" target="_blank" (?:class="DownloadNow"|style="color:red")>'
@@ -29,26 +32,28 @@ class EmbeduploadCom(Crypter):
if m:
prefered_set = set(self.getConfig("preferedHoster").split('|'))
prefered_set = map(lambda s: s.lower().split('.')[0], prefered_set)
- print "PF", prefered_set
+
+ self.logDebug("PF: %s" % prefered_set)
+
tmp_links.extend([x[1] for x in m if x[0] in prefered_set])
self.urls = self.getLocation(tmp_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
+
+ self.logDebug("IG: %s" % ignored_set)
+
tmp_links.extend([x[1] for x in m if x[0] not in ignored_set])
self.urls = self.getLocation(tmp_links)
- if not self.urls:
- self.fail('Could not extract any links')
def getLocation(self, tmp_links):
new_links = []
for link in tmp_links:
try:
header = self.load(link, just_header=True)
- if "location" in header:
+ if 'location' in header:
new_links.append(header['location'])
except BadHeader:
pass