From 45b6242579ac65444fd278e5ecde96be29136bbe Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 8 Jun 2015 05:49:47 +0200 Subject: New plugins: FiledropperCom & FileuploadNet --- module/plugins/hoster/FiledropperCom.py | 46 +++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 module/plugins/hoster/FiledropperCom.py (limited to 'module/plugins/hoster/FiledropperCom.py') diff --git a/module/plugins/hoster/FiledropperCom.py b/module/plugins/hoster/FiledropperCom.py new file mode 100644 index 000000000..73bab2d64 --- /dev/null +++ b/module/plugins/hoster/FiledropperCom.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- + +import re +import urlparse + +from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo + + +class FiledropperCom(SimpleHoster): + __name__ = "FiledropperCom" + __type__ = "hoster" + __version__ = "0.01" + + __pattern__ = r'https?://(?:www\.)?filedropper\.com/\w+' + + __description__ = """Filedropper.com hoster plugin""" + __license__ = "GPLv3" + __authors__ = [("zapp-brannigan", "fuerst.reinje@web.de")] + + + NAME_PATTERN = r'Filename: (?P.+?) <' + SIZE_PATTERN = r'Size: (?P[\d.,]+) (?P[\w^_]+),' #@NOTE: Website says always 0 KB + OFFLINE_PATTERN = r'value="a\.swf"' + + + def setup(self): + self.multiDL = False + self.chunkLimit = 1 + + + def handleFree(self, pyfile): + m = re.search(r'img id="img" src="(.+?)"', self.html) + if m is None: + self.fail("Captcha not found") + + captcha_code = self.decryptCaptcha("http://www.filedropper.com/%s" % m.group(1)) + + m = re.search(r'method="post" action="(.+?)"', self.html) + if m is None: + self.fail("Download link not found") + + self.download(urlparse.urljoin("http://www.filedropper.com/", m.group(1)), + post={'code': captcha_code}) + + +getInfo = create_getInfo(FiledropperCom) -- cgit v1.2.3