summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/TusfilesNet.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hoster/TusfilesNet.py')
-rw-r--r--module/plugins/hoster/TusfilesNet.py25
1 files changed, 15 insertions, 10 deletions
diff --git a/module/plugins/hoster/TusfilesNet.py b/module/plugins/hoster/TusfilesNet.py
index 303d001df..9fdb6eae1 100644
--- a/module/plugins/hoster/TusfilesNet.py
+++ b/module/plugins/hoster/TusfilesNet.py
@@ -1,12 +1,13 @@
# -*- coding: utf-8 -*-
-from pyload.plugin.internal.XFSHoster import XFSHoster, create_getInfo
+from module.network.HTTPRequest import BadHeader
+from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class TusfilesNet(XFSHoster):
__name__ = "TusfilesNet"
__type__ = "hoster"
- __version__ = "0.07"
+ __version__ = "0.09"
__pattern__ = r'https?://(?:www\.)?tusfiles\.net/\w{12}'
@@ -16,20 +17,24 @@ class TusfilesNet(XFSHoster):
("guidobelix", "guidobelix@hotmail.it")]
- HOSTER_DOMAIN = "tusfiles.net"
-
- INFO_PATTERN = r'\](?P<N>.+) - (?P<S>[\d.,]+) (?P<U>[\w^_]+)\['
- OFFLINE_PATTERN = r'>File Not Found|<Title>TusFiles - Fast Sharing Files!'
+ INFO_PATTERN = r'\](?P<N>.+) - (?P<S>[\d.,]+) (?P<U>[\w^_]+)\['
+ OFFLINE_PATTERN = r'>File Not Found|<Title>TusFiles - Fast Sharing Files!|The file you are trying to download is no longer available'
def setup(self):
- self.multiDL = False
- self.chunkLimit = -1
+ self.chunkLimit = -1
+ self.multiDL = True
self.resumeDownload = True
- def handlePremium(self):
- return self.handleFree()
+ 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")
getInfo = create_getInfo(TusfilesNet)