summaryrefslogtreecommitdiffstats
path: root/module/plugins/crypter/DuckCryptInfo.py
diff options
context:
space:
mode:
authorGravatar lazlev <lazlev@yopmail.com> 2015-08-09 00:50:54 +0200
committerGravatar lazlev <lazlev@yopmail.com> 2015-08-09 00:50:54 +0200
commitb0ef3f1673e1930916604bb1264ca3a38414bc8d (patch)
treec97936e4d2a4cd6eb1072c65c8a08a7d18816b18 /module/plugins/crypter/DuckCryptInfo.py
parent[XFileSharingPro][XFileSharingProFolder] Added default __pattern__ (diff)
parentFix https://github.com/pyload/pyload/issues/1707 (diff)
downloadpyload-b0ef3f1673e1930916604bb1264ca3a38414bc8d.tar.xz
Merge pull request #1 from pyload/stable
sync with stable
Diffstat (limited to 'module/plugins/crypter/DuckCryptInfo.py')
-rw-r--r--module/plugins/crypter/DuckCryptInfo.py27
1 files changed, 14 insertions, 13 deletions
diff --git a/module/plugins/crypter/DuckCryptInfo.py b/module/plugins/crypter/DuckCryptInfo.py
index cc108d101..c9269b05e 100644
--- a/module/plugins/crypter/DuckCryptInfo.py
+++ b/module/plugins/crypter/DuckCryptInfo.py
@@ -2,15 +2,16 @@
import re
-from BeautifulSoup import BeautifulSoup
+import BeautifulSoup
-from module.plugins.Crypter import Crypter
+from module.plugins.internal.Crypter import Crypter
class DuckCryptInfo(Crypter):
__name__ = "DuckCryptInfo"
__type__ = "crypter"
- __version__ = "0.02"
+ __version__ = "0.04"
+ __status__ = "testing"
__pattern__ = r'http://(?:www\.)?duckcrypt\.info/(folder|wait|link)/(\w+)/?(\w*)'
__config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True),
@@ -31,29 +32,29 @@ class DuckCryptInfo(Crypter):
if m is None:
self.fail(_("Weird error in link"))
if str(m.group(1)) == "link":
- self.handleLink(url)
+ self.handle_link(url)
else:
- self.handleFolder(m)
+ self.handle_folder(m)
- def handleFolder(self, m):
+ def handle_folder(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)))
+ self.log_debug("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))
+ soup = BeautifulSoup.BeautifulSoup(html)
+ cryptlinks = soup.findAll("div", attrs={'class': "folderbox"})
+ self.log_debug("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'])
+ self.handle_link(clink.find("a")['href'])
- def handleLink(self, url):
+ def handle_link(self, url):
html = self.load(url)
soup = BeautifulSoup(html)
self.urls = [soup.find("iframe")['src']]
if not self.urls:
- self.logInfo(_("No link found"))
+ self.log_info(_("No link found"))