diff options
author | igel-kun <mathiaswe@gmx.de> | 2014-03-07 15:40:59 +0100 |
---|---|---|
committer | Stefano <l.stickell@yahoo.it> | 2014-04-21 17:03:30 +0200 |
commit | 4d0ab74571d98c1dbe3e9df945b50868a5bf9d25 (patch) | |
tree | 1b253e5070e3c283dfdfa2a34353924843b09dd7 | |
parent | PutlockerCom (Firedrive now) and SockshareCom updated. (diff) | |
download | pyload-4d0ab74571d98c1dbe3e9df945b50868a5bf9d25.tar.xz |
New hoster NosuploadCom
New crypter NosvideoCom
Merged #496
(cherry picked from commit 46d41e6674954362cbb681b5ec541c8885b1b2c7)
-rw-r--r-- | module/plugins/crypter/NosvideoCom.py | 13 | ||||
-rw-r--r-- | module/plugins/hoster/NosuploadCom.py | 38 |
2 files changed, 51 insertions, 0 deletions
diff --git a/module/plugins/crypter/NosvideoCom.py b/module/plugins/crypter/NosvideoCom.py new file mode 100644 index 000000000..49b932fc0 --- /dev/null +++ b/module/plugins/crypter/NosvideoCom.py @@ -0,0 +1,13 @@ +from module.plugins.internal.SimpleCrypter import SimpleCrypter + + +class NosvideoCom(SimpleCrypter): + __name__ = "NosvideoCom" + __type__ = "crypter" + __pattern__ = r"http://(?:www\.)?nosvideo\.com/\?v=\w+" + __version__ = "0.01" + __description__ = """Nosvideo.com Plugin""" + __author_name__ = "igel" + + LINK_PATTERN = r'href="(http://(?:w{3}\.)?nosupload.com/\?d=\w+)"' + TITLE_PATTERN = r"<[tT]itle>Watch (?P<title>.+)</[tT]itle>" diff --git a/module/plugins/hoster/NosuploadCom.py b/module/plugins/hoster/NosuploadCom.py new file mode 100644 index 000000000..5735390bb --- /dev/null +++ b/module/plugins/hoster/NosuploadCom.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- + +import re + +from module.plugins.hoster.XFileSharingPro import XFileSharingPro, create_getInfo + + +class NosuploadCom(XFileSharingPro): + __name__ = "NosuploadCom" + __type__ = "hoster" + __version__ = "0.1" + __pattern__ = r"http://(?:www\.)?nosupload\.com/\?d=\w{12}" + __description__ = """nosupload.com hoster plugin""" + __author_name__ = "igel" + + HOSTER_NAME = "nosupload.com" + + FILE_SIZE_PATTERN = r'<p><strong>Size:</strong> (?P<S>[0-9\.]+) (?P<U>[kKMG]?B)</p>' + DIRECT_LINK_PATTERN = r'<a class="select" href="(http://.+?)">Download</a>' + WAIT_PATTERN = r'Please wait.*?>(\d+)</span>' + + def getDownloadLink(self): + # stage1: press the "Free Download" button + data = self.getPostParameters() + self.html = self.load(self.pyfile.url, post=data, ref=True, decode=True) + + # stage2: wait some time and press the "Download File" button + data = self.getPostParameters() + wait_time = re.search(self.WAIT_PATTERN, self.html, re.MULTILINE | re.DOTALL).group(1) + self.logDebug("hoster told us to wait %s seconds" % wait_time) + self.wait(wait_time) + self.html = self.load(self.pyfile.url, post=data, ref=True, decode=True) + + # stage3: get the download link + return re.search(self.DIRECT_LINK_PATTERN, self.html, re.S).group(1) + + +getInfo = create_getInfo(NosuploadCom) |