summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/crypter/DuckCryptInfo.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-12-13 15:56:57 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-12-13 15:56:57 +0100
commitacc46fc3497a66a427b795b4a22c6e71d69185a1 (patch)
tree2d315b838a76435fc456b972c99c28d1732b2f70 /pyload/plugins/crypter/DuckCryptInfo.py
parentCode fixes (diff)
downloadpyload-acc46fc3497a66a427b795b4a22c6e71d69185a1.tar.xz
Update
Diffstat (limited to 'pyload/plugins/crypter/DuckCryptInfo.py')
-rw-r--r--pyload/plugins/crypter/DuckCryptInfo.py59
1 files changed, 0 insertions, 59 deletions
diff --git a/pyload/plugins/crypter/DuckCryptInfo.py b/pyload/plugins/crypter/DuckCryptInfo.py
deleted file mode 100644
index 2188949bb..000000000
--- a/pyload/plugins/crypter/DuckCryptInfo.py
+++ /dev/null
@@ -1,59 +0,0 @@
-# -*- coding: utf-8 -*-
-
-import re
-
-from BeautifulSoup import BeautifulSoup
-
-from pyload.plugins.Crypter import Crypter
-
-
-class DuckCryptInfo(Crypter):
- __name = "DuckCryptInfo"
- __type = "crypter"
- __version = "0.02"
-
- __pattern = r'http://(?:www\.)?duckcrypt\.info/(folder|wait|link)/(\w+)/?(\w*)'
- __config = [("use_subfolder", "bool", "Save package to subfolder", True),
- ("subfolder_per_package", "bool", "Create a subfolder for each package", True)]
-
- __description = """DuckCrypt.info decrypter plugin"""
- __license = "GPLv3"
- __authors = [("godofdream", "soilfiction@gmail.com")]
-
-
- TIMER_PATTERN = r'<span id="timer">(.*)</span>'
-
-
- def decrypt(self, pyfile):
- url = pyfile.url
-
- m = re.match(self.__pattern, url)
- if m is None:
- self.fail(_("Weird error in link"))
- if str(m.group(1)) == "link":
- self.handleLink(url)
- else:
- self.handleFolder(m)
-
-
- def handleFolder(self, m):
- html = self.load("http://duckcrypt.info/ajax/auth.php?hash=" + str(m.group(2)))
- m = re.match(self.__pattern, html)
- self.logDebug("Redirectet to " + str(m.group(0)))
- html = self.load(str(m.group(0)))
- soup = BeautifulSoup(html)
- cryptlinks = soup.findAll("div", attrs={"class": "folderbox"})
- self.logDebug("Redirectet to " + str(cryptlinks))
- if not cryptlinks:
- self.error(_("No link found"))
- for clink in cryptlinks:
- if clink.find("a"):
- self.handleLink(clink.find("a")['href'])
-
-
- def handleLink(self, url):
- html = self.load(url)
- soup = BeautifulSoup(html)
- self.urls = [soup.find("iframe")['src']]
- if not self.urls:
- self.logInfo(_("No link found"))