From 611034705079e9c0e432efbabbadb5a9292a383f Mon Sep 17 00:00:00 2001 From: godofdream Date: Wed, 3 Oct 2012 19:00:25 +0200 Subject: Fix DuckcryptInfo and NowDownloadEu --- module/plugins/crypter/DuckCryptInfo.py | 7 ++++--- module/plugins/hoster/NowDownloadEu.py | 8 ++++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/module/plugins/crypter/DuckCryptInfo.py b/module/plugins/crypter/DuckCryptInfo.py index 6e7166ff8..4886d24db 100644 --- a/module/plugins/crypter/DuckCryptInfo.py +++ b/module/plugins/crypter/DuckCryptInfo.py @@ -8,7 +8,7 @@ class DuckCryptInfo(Crypter): __name__ = "DuckCryptInfo" __type__ = "container" __pattern__ = r"http://(?:www\.)?duckcrypt.info/(folder|wait|link)/(\w+)/?(\w*)" - __version__ = "0.01" + __version__ = "0.02" __description__ = """DuckCrypt.Info Container Plugin""" __author_name__ = ("godofdream") __author_mail__ = ("soilfiction@gmail.com") @@ -39,12 +39,13 @@ class DuckCryptInfo(Crypter): self.logDebug("Redirectet to " + str(found.group(0))) src = self.load(str(found.group(0))) soup = BeautifulSoup(src) - cryptlinks = soup.find("div", attrs={"class": "folderbox"}).findAll("a") + cryptlinks = soup.findAll("div", attrs={"class": "folderbox"}) self.logDebug("Redirectet to " + str(cryptlinks)) if not cryptlinks: self.fail('no links found - (Plugin out of date?)') for clink in cryptlinks: - self.handleLink(clink['href']) + if clink.find("a"): + self.handleLink(clink.find("a")['href']) def handleLink(self, url): src = self.load(url) diff --git a/module/plugins/hoster/NowDownloadEu.py b/module/plugins/hoster/NowDownloadEu.py index fa699a278..126ca3d89 100644 --- a/module/plugins/hoster/NowDownloadEu.py +++ b/module/plugins/hoster/NowDownloadEu.py @@ -19,12 +19,13 @@ import re from random import random from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.utils import fixup class NowDownloadEu(SimpleHoster): __name__ = "NowDownloadEu" __type__ = "hoster" __pattern__ = r"http://(www\.)?nowdownload\.(eu|co)/dl/(?P[a-z0-9]+)" - __version__ = "0.01" + __version__ = "0.02" __description__ = """NowDownloadEu""" __author_name__ = ("godofdream") FILE_INFO_PATTERN = r'Downloading
(?P.*) (?P[0-9,.]+) (?P[kKMG])i?B ' @@ -33,6 +34,9 @@ class NowDownloadEu(SimpleHoster): FILE_CONTINUE_PATTERN = r'"(/dl2/[a-z0-9]+/[a-z0-9]+)"' FILE_WAIT_PATTERN = r'\.countdown\(\{until: \+(\d+),' FILE_DOWNLOAD_LINK = r'"(http://f\d+\.nowdownload\.eu/dl/[a-z0-9]+/[a-z0-9]+/[^<>"]*?)"' + + FILE_NAME_REPLACEMENTS = [("&#?\w+;", fixup), (r'<[^>]*>', '')] + def setup(self): self.wantReconnect = False self.multiDL = True @@ -59,4 +63,4 @@ class NowDownloadEu(SimpleHoster): self.logDebug('Download link: ' + str(url.group(1))) self.download(str(url.group(1))) -getInfo = create_getInfo(NowDownloadEu) \ No newline at end of file +getInfo = create_getInfo(NowDownloadEu) -- cgit v1.2.3