From 55233a0e25d6034c9b80568fdda24041a00b2eb9 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 5 Oct 2014 22:08:34 +0200 Subject: New hoster plugin FilepupNet --- module/plugins/hoster/FilepupNet.py | 50 +++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 module/plugins/hoster/FilepupNet.py (limited to 'module/plugins/hoster/FilepupNet.py') diff --git a/module/plugins/hoster/FilepupNet.py b/module/plugins/hoster/FilepupNet.py new file mode 100644 index 000000000..69065565f --- /dev/null +++ b/module/plugins/hoster/FilepupNet.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# +# Test links: +# http://www.filepup.net/files/k5w4ZVoF1410184283.html +# http://www.filepup.net/files/R4GBq9XH1410186553.html + +import re + +from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo + + +class FilepupNet(SimpleHoster): + __name__ = "FilepupNet" + __type__ = "hoster" + __version__ = "0.01" + + __pattern__ = r"http://(?:www\.)?filepup\.net/files/\w+" + + __description__ = """Filepup.net hoster plugin""" + __author_name__ = ("zapp-brannigan", "Walter Purcaro") + __author_mail__ = ("fuerst.reinje@web.de", "vuolter@gmail.com") + + + FILE_NAME_PATTERN = r'>(?P.+?)' + FILE_SIZE_PATTERN = r'class="fa fa-archive"> \((?P[\d.]+) (?P\w+)' + + OFFLINE_PATTERN = r'>This file has been deleted' + + LINK_PATTERN = r'(http://www\.filepup\.net/get/.+?)\'' + + + def setup(self): + self.multiDL = False + self.chunkLimit = 1 + + + def handleFree(self): + m = re.search(self.LINK_PATTERN, self.html) + if m is None: + self.parseError("Download link not found") + + dl_link = m.group(1) + self.download(dl_link, post={'task': "download"}) + + check = self.checkDownload({'html': re.compile("html")}) + if check == "html": + self.parseError("Downloaded file is an html file") + + +getInfo = create_getInfo(FilepupNet) -- cgit v1.2.3 From ff91b58bf9ee65aaeb048426295af6ad122b119e Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 5 Oct 2014 22:14:53 +0200 Subject: Spare code cosmetics --- module/plugins/hoster/FilepupNet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/FilepupNet.py') diff --git a/module/plugins/hoster/FilepupNet.py b/module/plugins/hoster/FilepupNet.py index 69065565f..b09f12940 100644 --- a/module/plugins/hoster/FilepupNet.py +++ b/module/plugins/hoster/FilepupNet.py @@ -14,7 +14,7 @@ class FilepupNet(SimpleHoster): __type__ = "hoster" __version__ = "0.01" - __pattern__ = r"http://(?:www\.)?filepup\.net/files/\w+" + __pattern__ = r'http://(?:www\.)?filepup\.net/files/\w+' __description__ = """Filepup.net hoster plugin""" __author_name__ = ("zapp-brannigan", "Walter Purcaro") -- cgit v1.2.3 From b0868ae6446078bacf1635dde5e4ab316b4a94cb Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 7 Oct 2014 18:57:59 +0200 Subject: New __authors__ key replaces __author_name__ and __author_mail__ + Whitespaces and EOF fixup --- module/plugins/hoster/FilepupNet.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/FilepupNet.py') diff --git a/module/plugins/hoster/FilepupNet.py b/module/plugins/hoster/FilepupNet.py index b09f12940..12b2f7798 100644 --- a/module/plugins/hoster/FilepupNet.py +++ b/module/plugins/hoster/FilepupNet.py @@ -17,8 +17,8 @@ class FilepupNet(SimpleHoster): __pattern__ = r'http://(?:www\.)?filepup\.net/files/\w+' __description__ = """Filepup.net hoster plugin""" - __author_name__ = ("zapp-brannigan", "Walter Purcaro") - __author_mail__ = ("fuerst.reinje@web.de", "vuolter@gmail.com") + __authors__ = [("zapp-brannigan", "fuerst.reinje@web.de"), + ("Walter Purcaro", "vuolter@gmail.com")] FILE_NAME_PATTERN = r'>(?P.+?)' -- cgit v1.2.3