summaryrefslogtreecommitdiffstats
path: root/module/plugins/crypter/LofCc.py
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2010-08-25 16:48:55 +0200
committerGravatar mkaay <mkaay@mkaay.de> 2010-08-25 16:48:55 +0200
commit3c9f55270a83b0e88ec0dc516f9d9921e4d7b6ea (patch)
treec5b2b1bfeb7eb8df2b97be118f6cbcec4e29cb3b /module/plugins/crypter/LofCc.py
parentul.to fetching, so.biz expire (diff)
downloadpyload-3c9f55270a83b0e88ec0dc516f9d9921e4d7b6ea.tar.xz
merged gui
Diffstat (limited to 'module/plugins/crypter/LofCc.py')
-rw-r--r--module/plugins/crypter/LofCc.py47
1 files changed, 0 insertions, 47 deletions
diff --git a/module/plugins/crypter/LofCc.py b/module/plugins/crypter/LofCc.py
deleted file mode 100644
index cd3a6fe4d..000000000
--- a/module/plugins/crypter/LofCc.py
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-import re
-from time import sleep
-from os.path import join
-
-from module.plugins.Crypter import Crypter
-from module.plugins.ReCaptcha import ReCaptcha
-
-class LofCc(Crypter):
- __name__ = "LofCc"
- __type__ = "container"
- __pattern__ = r"http://lof.cc/(.*)"
- __version__ = "0.1"
- __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://api.recaptcha.net/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()
-
- 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))