From ce1c2b6b05c08b669357947e61ae40efce7fc50f Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 16 Feb 2015 10:46:28 +0100 Subject: module temp --- module/plugins/hoster/LoadTo.py | 75 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 module/plugins/hoster/LoadTo.py (limited to 'module/plugins/hoster/LoadTo.py') diff --git a/module/plugins/hoster/LoadTo.py b/module/plugins/hoster/LoadTo.py new file mode 100644 index 000000000..052d79214 --- /dev/null +++ b/module/plugins/hoster/LoadTo.py @@ -0,0 +1,75 @@ +# -*- coding: utf-8 -*- +# +# Test links: +# http://www.load.to/JWydcofUY6/random.bin +# http://www.load.to/oeSmrfkXE/random100.bin + +import re + +from pyload.plugin.internal.captcha import SolveMedia +from pyload.plugin.internal.SimpleHoster import SimpleHoster, create_getInfo + + +class LoadTo(SimpleHoster): + __name__ = "LoadTo" + __type__ = "hoster" + __version__ = "0.18" + + __pattern__ = r'http://(?:www\.)?load\.to/\w+' + + __description__ = """Load.to hoster plugin""" + __license__ = "GPLv3" + __authors__ = [("halfman", "Pulpan3@gmail.com"), + ("stickell", "l.stickell@yahoo.it")] + + + NAME_PATTERN = r'

(?P.+)

' + SIZE_PATTERN = r'Size: (?P[\d.,]+) (?P[\w^_]+)' + OFFLINE_PATTERN = r'>Can\'t find file' + + LINK_PATTERN = r'
404 Not Found"), 'html': re.compile("html")}) + + if check == "404": + self.invalidCaptcha() + self.retry() + elif check == "html": + self.logWarning(_("Downloaded file is an html page, will retry")) + self.retry() + + +getInfo = create_getInfo(LoadTo) -- cgit v1.2.3