From 8e7d14bae4d3c836f029a1235eb227380acc3f75 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 16 Feb 2015 21:59:10 +0100 Subject: Fix plugins to work on 0.4.10 --- pyload/plugin/hoster/TusfilesNet.py | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 pyload/plugin/hoster/TusfilesNet.py (limited to 'pyload/plugin/hoster/TusfilesNet.py') diff --git a/pyload/plugin/hoster/TusfilesNet.py b/pyload/plugin/hoster/TusfilesNet.py new file mode 100644 index 000000000..20a948925 --- /dev/null +++ b/pyload/plugin/hoster/TusfilesNet.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- + +from pyload.network.HTTPRequest import BadHeader +from pyload.plugin.internal.XFSHoster import XFSHoster + + +class TusfilesNet(XFSHoster): + __name__ = "TusfilesNet" + __type__ = "hoster" + __version__ = "0.09" + + __pattern__ = r'https?://(?:www\.)?tusfiles\.net/\w{12}' + + __description__ = """Tusfiles.net hoster plugin""" + __license__ = "GPLv3" + __authors__ = [("Walter Purcaro", "vuolter@gmail.com"), + ("guidobelix", "guidobelix@hotmail.it")] + + + INFO_PATTERN = r'\](?P.+) - (?P[\d.,]+) (?P[\w^_]+)\[' + OFFLINE_PATTERN = r'>File Not Found|TusFiles - Fast Sharing Files!|The file you are trying to download is no longer available' + + + def setup(self): + self.chunkLimit = -1 + self.multiDL = True + self.resumeDownload = True + + + def downloadLink(self, link): + try: + return super(TusfilesNet, self).downloadLink(link) + + except BadHeader, e: + if e.code is 503: + self.multiDL = False + raise Retry("503") -- cgit v1.2.3