summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/crypter/LofCc.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/plugins/crypter/LofCc.py')
-rw-r--r--pyload/plugins/crypter/LofCc.py44
1 files changed, 3 insertions, 41 deletions
diff --git a/pyload/plugins/crypter/LofCc.py b/pyload/plugins/crypter/LofCc.py
index 5fee776c7..458609881 100644
--- a/pyload/plugins/crypter/LofCc.py
+++ b/pyload/plugins/crypter/LofCc.py
@@ -1,51 +1,13 @@
-#!/usr/bin/env python
# -*- coding: utf-8 -*-
-import re
-from os.path import join
+from module.plugins.internal.DeadCrypter import DeadCrypter
-from module.plugins.Crypter import Crypter
-from module.plugins.internal.CaptchaService import ReCaptcha
-
-class LofCc(Crypter):
+class LofCc(DeadCrypter):
__name__ = "LofCc"
__type__ = "container"
__pattern__ = r"http://lof.cc/(.*)"
- __version__ = "0.2"
+ __version__ = "0.21"
__description__ = """lof.cc Plugin"""
__author_name__ = ("mkaay")
__author_mail__ = ("mkaay@mkaay.de")
-
- def setup(self):
- self.multiDL = False
-
- def decrypt(self, pyfile):
- html = self.req.load(self.pyfile.url, cookies=True)
-
- m = re.search(r"src=\"http://www.google.com/recaptcha/api/challenge\?k=(.*?)\"></script>", html)
- if not m:
- self.offline()
-
- recaptcha = ReCaptcha(self)
- challenge, code = recaptcha.challenge(m.group(1))
-
- resultHTML = self.req.load(self.pyfile.url,
- post={"recaptcha_challenge_field": challenge, "recaptcha_response_field": code},
- cookies=True)
-
- if re.search("class=\"error\"", resultHTML):
- self.retry()
-
- self.correctCaptcha()
-
- dlc = self.req.load(self.pyfile.url + "/dlc", cookies=True)
-
- name = re.search(self.__pattern__, self.pyfile.url).group(1) + ".dlc"
-
- dlcFile = join(self.config["general"]["download_folder"], name)
- f = open(dlcFile, "wb")
- f.write(dlc)
- f.close()
-
- self.packages.append((self.pyfile.package().name, [dlcFile], self.pyfile.package().folder))