summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/crypter/TusfilesNetFolder.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/plugins/crypter/TusfilesNetFolder.py')
-rw-r--r--pyload/plugins/crypter/TusfilesNetFolder.py26
1 files changed, 15 insertions, 11 deletions
diff --git a/pyload/plugins/crypter/TusfilesNetFolder.py b/pyload/plugins/crypter/TusfilesNetFolder.py
index 245cb20bf..e8da59736 100644
--- a/pyload/plugins/crypter/TusfilesNetFolder.py
+++ b/pyload/plugins/crypter/TusfilesNetFolder.py
@@ -4,23 +4,26 @@ import math
import re
from urlparse import urljoin
-from pyload.plugins.internal.SimpleCrypter import SimpleCrypter
+from module.plugins.internal.XFSCrypter import XFSCrypter
-class TusfilesNetFolder(SimpleCrypter):
- __name__ = "TusfilesNetFolder"
- __type__ = "crypter"
- __version__ = "0.03"
+class TusfilesNetFolder(XFSCrypter):
+ __name__ = "TusfilesNetFolder"
+ __type__ = "crypter"
+ __version__ = "0.06"
- __pattern__ = r'https?://(?:www\.)?tusfiles\.net/go/(?P<ID>\w+)/?'
+ __pattern__ = r'https?://(?:www\.)?tusfiles\.net/go/(?P<ID>\w+)'
+ __config__ = [("use_subfolder", "bool", "Save package to subfolder", True),
+ ("subfolder_per_package", "bool", "Create a subfolder for each package", True)]
__description__ = """Tusfiles.net folder decrypter plugin"""
- __authors__ = [("Walter Purcaro", "vuolter@gmail.com"),
- ("stickell", "l.stickell@yahoo.it")]
+ __license__ = "GPLv3"
+ __authors__ = [("Walter Purcaro", "vuolter@gmail.com"),
+ ("stickell", "l.stickell@yahoo.it")]
- LINK_PATTERN = r'<TD align=left><a href="(.*?)">'
- TITLE_PATTERN = r'<Title>.*?\: (.+) folder</Title>'
+ HOSTER_DOMAIN = "tusfiles.net"
+
PAGES_PATTERN = r'>\((\d+) \w+\)<'
URL_REPLACEMENTS = [(__pattern__, r'https://www.tusfiles.net/go/\g<ID>/')]
@@ -29,6 +32,7 @@ class TusfilesNetFolder(SimpleCrypter):
def loadPage(self, page_n):
return self.load(urljoin(self.pyfile.url, str(page_n)), decode=True)
+
def handleMultiPages(self):
pages = re.search(self.PAGES_PATTERN, self.html)
if pages:
@@ -38,4 +42,4 @@ class TusfilesNetFolder(SimpleCrypter):
for p in xrange(2, pages + 1):
self.html = self.loadPage(p)
- self.package_links += self.getLinks()
+ self.links += self.getLinks()