summaryrefslogtreecommitdiffstats
path: root/module/plugins/crypter
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-11-07 17:08:21 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-11-07 17:08:21 +0100
commit58c9c8d78417ec6ccac5b6b117ea540033a09574 (patch)
tree38b4cef702d015cae371dc661e214d701ca8c5c4 /module/plugins/crypter
parent[DataportCz][SendspaceCom] Fix missing getInfo (diff)
downloadpyload-58c9c8d78417ec6ccac5b6b117ea540033a09574.tar.xz
Fix download link formatting in some plugins
Diffstat (limited to 'module/plugins/crypter')
-rw-r--r--module/plugins/crypter/EmbeduploadCom.py2
-rw-r--r--module/plugins/crypter/SafelinkingNet.py16
2 files changed, 8 insertions, 10 deletions
diff --git a/module/plugins/crypter/EmbeduploadCom.py b/module/plugins/crypter/EmbeduploadCom.py
index 7f06c99bd..1c372c1ca 100644
--- a/module/plugins/crypter/EmbeduploadCom.py
+++ b/module/plugins/crypter/EmbeduploadCom.py
@@ -53,7 +53,7 @@ class EmbeduploadCom(Crypter):
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
diff --git a/module/plugins/crypter/SafelinkingNet.py b/module/plugins/crypter/SafelinkingNet.py
index 1fbb6e137..9bb6c3229 100644
--- a/module/plugins/crypter/SafelinkingNet.py
+++ b/module/plugins/crypter/SafelinkingNet.py
@@ -14,7 +14,7 @@ from module.plugins.internal.CaptchaService import SolveMedia
class SafelinkingNet(Crypter):
__name__ = "SafelinkingNet"
__type__ = "crypter"
- __version__ = "0.1"
+ __version__ = "0.11"
__pattern__ = r'https?://(?:www\.)?safelinking\.net/([pd])/\w+'
__config__ = [("use_subfolder", "bool", "Save package to subfolder", True),
@@ -30,20 +30,18 @@ class SafelinkingNet(Crypter):
def decrypt(self, pyfile):
url = pyfile.url
+
if re.match(self.__pattern__, url).group(1) == "d":
- self.req.http.c.setopt(FOLLOWLOCATION, 0)
- self.load(url)
- m = re.search("^Location: (.+)$", self.req.http.header, re.M)
- if m:
- self.urls = [m.group(1)]
+
+ header = self.load(url, just_header=True)
+ if 'location' in header:
+ self.urls = [header['location']]
else:
- self.fail(_("Couldn't find forwarded Link"))
+ self.error(_("Couldn't find forwarded Link"))
else:
postData = {"post-protect": "1"}
- self.html = self.load(url)
-
if "link-password" in self.html:
postData['link-password'] = self.getPassword()