diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-01-17 21:41:30 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-01-17 21:41:30 +0100 |
commit | b788f326db526fd05341789557643a69900eac72 (patch) | |
tree | 45c1932978d9aeb3284ac14d995b0d8941597688 /module | |
parent | Fixed name of downloads again (diff) | |
parent | Merged in z00nx0/pyload/IFileWs (pull request #51: Added IFileWs plugin) (diff) | |
download | pyload-b788f326db526fd05341789557643a69900eac72.tar.xz |
Merged in z00nx0/pyload/CloudzerNet (pull request #50: Fixes the issue with download names)
Diffstat (limited to 'module')
-rw-r--r-- | module/plugins/crypter/LetitbitNetFolder.py | 33 | ||||
-rw-r--r-- | module/plugins/hoster/CatShareNet.py | 38 | ||||
-rw-r--r-- | module/plugins/hoster/IFileWs.py | 20 | ||||
-rw-r--r-- | module/plugins/hoster/SecureUploadEu.py | 18 |
4 files changed, 109 insertions, 0 deletions
diff --git a/module/plugins/crypter/LetitbitNetFolder.py b/module/plugins/crypter/LetitbitNetFolder.py new file mode 100644 index 000000000..68aad9dd7 --- /dev/null +++ b/module/plugins/crypter/LetitbitNetFolder.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- + +import re +from module.plugins.Crypter import Crypter + + +class LetitbitNetFolder(Crypter): + __name__ = "LetitbitNetFolder" + __type__ = "crypter" + __pattern__ = r"http://(?:www\.)?letitbit.net/folder/\w+" + __version__ = "0.1" + __description__ = """Letitbit.net Folder Plugin""" + __author_name__ = ("DHMH", "z00nx") + __author_mail__ = ("webmaster@pcProfil.de", "z00nx0@gmail.com") + + FOLDER_PATTERN = r'<table>(.*)</table>' + LINK_PATTERN = r'<a href="([^"]+)" target="_blank">' + + def decrypt(self, pyfile): + html = self.load(self.pyfile.url) + + new_links = [] + + folder = re.search(self.FOLDER_PATTERN, html, re.DOTALL) + if folder is None: + self.fail("Parse error (FOLDER)") + + new_links.extend(re.findall(self.LINK_PATTERN, folder.group(0))) + + if new_links: + self.core.files.addLinks(new_links, self.pyfile.package().id) + else: + self.fail('Could not extract any links') diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py new file mode 100644 index 000000000..47063096e --- /dev/null +++ b/module/plugins/hoster/CatShareNet.py @@ -0,0 +1,38 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +import re +from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.ReCaptcha import ReCaptcha + + +class CatShareNet(SimpleHoster): + __name__ = "CatShareNet" + __type__ = "hoster" + __pattern__ = r"http://(www\.)?catshare.net/\w{16}.*" + __version__ = "0.01" + __description__ = """CatShare.net Download Hoster""" + __author_name__ = ("z00nx") + __author_mail__ = ("z00nx0@gmail.com") + + FILE_INFO_PATTERN = r'<h3 class="pull-left"[^>]+>(?P<N>.*)</h3>\s+<h3 class="pull-right"[^>]+>(?P<S>.*)</h3>' + FILE_OFFLINE_PATTERN = r'Podany plik zosta' + SECONDS_PATTERN = 'var\s+count\s+=\s+(\d+);' + RECAPTCHA_KEY = "6Lfln9kSAAAAANZ9JtHSOgxUPB9qfDFeLUI_QMEy" + + def handleFree(self): + found = re.search(self.SECONDS_PATTERN, self.html) + seconds = int(found.group(1)) + self.logDebug("Seconds found", seconds) + self.setWait(seconds + 1) + self.wait() + recaptcha = ReCaptcha(self) + challenge, code = recaptcha.challenge(self.RECAPTCHA_KEY) + post_data = {"recaptcha_challenge_field": challenge, "recaptcha_response_field": code} + self.download(self.pyfile.url, post=post_data) + check = self.checkDownload({"html": re.compile("\A<!DOCTYPE html PUBLIC")}) + if check == "html": + self.logDebug("Wrong captcha entered") + self.invalidCaptcha() + self.retry() + +getInfo = create_getInfo(CatShareNet) diff --git a/module/plugins/hoster/IFileWs.py b/module/plugins/hoster/IFileWs.py new file mode 100644 index 000000000..160fe641c --- /dev/null +++ b/module/plugins/hoster/IFileWs.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +from module.plugins.hoster.XFileSharingPro import XFileSharingPro, create_getInfo + + +class IFileWs(XFileSharingPro): + __name__ = "IFileWs" + __type__ = "hoster" + __pattern__ = r"http://(www\.)?ifile\.ws/\w+(/.+)?" + __version__ = "0.01" + __description__ = """Ifile.ws hoster plugin""" + __author_name__ = ("z00nx") + __author_mail__ = ("z00nx0@gmail.com") + + FILE_INFO_PATTERN = '<h1\s+style="display:inline;">(?P<N>[^<]+)</h1>\s+\[(?P<S>[^]]+)\]' + FILE_OFFLINE_PATTERN = 'File Not Found|The file was removed by administrator' + HOSTER_NAME = "ifile.ws" + LONG_WAIT_PATTERN = "(?P<M>\d(?=\s+minutes)).*(?P<S>\d+(?=\s+seconds))" + + +getInfo = create_getInfo(IFileWs) diff --git a/module/plugins/hoster/SecureUploadEu.py b/module/plugins/hoster/SecureUploadEu.py new file mode 100644 index 000000000..b9a900d96 --- /dev/null +++ b/module/plugins/hoster/SecureUploadEu.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +from module.plugins.hoster.XFileSharingPro import XFileSharingPro, create_getInfo + + +class SecureUploadEu(XFileSharingPro): + __name__ = "SecureUploadEu" + __type__ = "hoster" + __pattern__ = r"http://(www\.)?secureupload\.eu/(\w){12}(/\w+)" + __version__ = "0.01" + __description__ = """SecureUpload.eu hoster plugin""" + __author_name__ = ("z00nx") + __author_mail__ = ("z00nx0@gmail.com") + + HOSTER_NAME = "secureupload.eu" + FILE_INFO_PATTERN = '<h3>Downloading (?P<N>[^<]+) \((?P<S>[^<]+)\)</h3>' + FILE_OFFLINE_PATTERN = 'The file was removed|File Not Found' + +getInfo = create_getInfo(SecureUploadEu) |