diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-09-21 14:36:22 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-09-21 14:36:22 +0200 |
commit | f9fc367427e30b7a3ca2ccad6144cb76b21f0257 (patch) | |
tree | d35656dd6253edcfdd4d19efe1756c0fddacaf27 /module/plugins/crypter | |
parent | Fix pyfile.name processing (diff) | |
download | pyload-f9fc367427e30b7a3ca2ccad6144cb76b21f0257.tar.xz |
Spare code cosmetics
Diffstat (limited to 'module/plugins/crypter')
-rw-r--r-- | module/plugins/crypter/ChipDe.py | 2 | ||||
-rw-r--r-- | module/plugins/crypter/CloudzillaToFolder.py | 1 | ||||
-rw-r--r-- | module/plugins/crypter/LinkCryptWs.py | 1 | ||||
-rw-r--r-- | module/plugins/crypter/NCryptIn.py | 2 | ||||
-rw-r--r-- | module/plugins/crypter/RelinkUs.py | 2 | ||||
-rw-r--r-- | module/plugins/crypter/ShareLinksBiz.py | 4 | ||||
-rw-r--r-- | module/plugins/crypter/UploadedToFolder.py | 1 |
7 files changed, 11 insertions, 2 deletions
diff --git a/module/plugins/crypter/ChipDe.py b/module/plugins/crypter/ChipDe.py index 3604635e5..8d823d88d 100644 --- a/module/plugins/crypter/ChipDe.py +++ b/module/plugins/crypter/ChipDe.py @@ -23,8 +23,10 @@ class ChipDe(Crypter): self.html = self.load(pyfile.url) try: f = re.search(r'"(http://video\.chip\.de/.+)"', self.html) + except Exception: self.fail(_("Failed to find the URL")) + else: self.urls = [f.group(1)] self.log_debug("The file URL is %s" % self.urls[0]) diff --git a/module/plugins/crypter/CloudzillaToFolder.py b/module/plugins/crypter/CloudzillaToFolder.py index ff58f954c..6c8ce5917 100644 --- a/module/plugins/crypter/CloudzillaToFolder.py +++ b/module/plugins/crypter/CloudzillaToFolder.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- import re -import urlparse from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo diff --git a/module/plugins/crypter/LinkCryptWs.py b/module/plugins/crypter/LinkCryptWs.py index 16ee1d4f1..47ea461f1 100644 --- a/module/plugins/crypter/LinkCryptWs.py +++ b/module/plugins/crypter/LinkCryptWs.py @@ -272,6 +272,7 @@ class LinkCryptWs(Crypter): (vcrypted, vjk) = self._get_cipher_params(cnl_section) for (crypted, jk) in zip(vcrypted, vjk): package_links.extend(self._get_links(crypted, jk)) + except Exception: self.log_error(_("Unable to decrypt CNL links (JS Error) try to get over links")) return self.handle_web_links() diff --git a/module/plugins/crypter/NCryptIn.py b/module/plugins/crypter/NCryptIn.py index d483be323..32c9283f7 100644 --- a/module/plugins/crypter/NCryptIn.py +++ b/module/plugins/crypter/NCryptIn.py @@ -229,6 +229,7 @@ class NCryptIn(Crypter): (vcrypted, vjk) = self._get_cipher_params() for (crypted, jk) in zip(vcrypted, vjk): package_links.extend(self._get_links(crypted, jk)) + except Exception: self.fail(_("Unable to decrypt CNL2 links")) @@ -270,6 +271,7 @@ class NCryptIn(Crypter): url = link.replace("link-", "frame-") link = self.load(url, just_header=True)['location'] return link + except Exception, detail: self.log_debug("Error decrypting link %s, %s" % (link, detail)) diff --git a/module/plugins/crypter/RelinkUs.py b/module/plugins/crypter/RelinkUs.py index b3c13db5d..641353865 100644 --- a/module/plugins/crypter/RelinkUs.py +++ b/module/plugins/crypter/RelinkUs.py @@ -205,8 +205,10 @@ class RelinkUs(Crypter): (vcrypted, vjk) = self._get_cipher_params(cnl2_form) for (crypted, jk) in zip(vcrypted, vjk): package_links.extend(self._get_links(crypted, jk)) + except Exception: self.log_debug("Unable to decrypt CNL2 links") + return package_links diff --git a/module/plugins/crypter/ShareLinksBiz.py b/module/plugins/crypter/ShareLinksBiz.py index 712b4fff2..2e9abff61 100644 --- a/module/plugins/crypter/ShareLinksBiz.py +++ b/module/plugins/crypter/ShareLinksBiz.py @@ -216,8 +216,10 @@ class ShareLinksBiz(Crypter): self.log_debug("JsEngine returns value [%s] for redirection link" % dlLink) package_links.append(dlLink) + except Exception, detail: self.log_debug("Error decrypting Web link [%s], %s" % (ID, detail)) + return package_links @@ -242,8 +244,10 @@ class ShareLinksBiz(Crypter): try: (crypted, jk) = self._get_cipher_params() package_links.extend(self._get_links(crypted, jk)) + except Exception: self.fail(_("Unable to decrypt CNL2 links")) + return package_links diff --git a/module/plugins/crypter/UploadedToFolder.py b/module/plugins/crypter/UploadedToFolder.py index 381d744fe..53fb5e4b9 100644 --- a/module/plugins/crypter/UploadedToFolder.py +++ b/module/plugins/crypter/UploadedToFolder.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- import re -import urlparse from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo |