From 15362ebceaee1eb66920d4822d2faa947151e74a Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 5 Jul 2014 16:42:24 +0200 Subject: [SimpleCrypter] Better inline docs + support for offline & temp.offline check --- module/plugins/crypter/TusfilesNetFolder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/crypter/TusfilesNetFolder.py') diff --git a/module/plugins/crypter/TusfilesNetFolder.py b/module/plugins/crypter/TusfilesNetFolder.py index 0bc770f99..5ee32379d 100644 --- a/module/plugins/crypter/TusfilesNetFolder.py +++ b/module/plugins/crypter/TusfilesNetFolder.py @@ -27,7 +27,7 @@ class TusfilesNetFolder(SimpleCrypter): __name__ = "TusfilesNetFolder" __type__ = "crypter" __pattern__ = r'https?://(?:www\.)?tusfiles\.net/go/(?P\w+)/?' - __version__ = "0.01" + __version__ = "0.02" __description__ = """Tusfiles.net folder decrypter plugin""" __author_name__ = ("Walter Purcaro", "stickell") __author_mail__ = ("vuolter@gmail.com", "l.stickell@yahoo.it") @@ -36,7 +36,7 @@ class TusfilesNetFolder(SimpleCrypter): TITLE_PATTERN = r'.*?\: (?P<title>.+) folder' PAGES_PATTERN = r'>\((?P\d+) \w+\)<' - FILE_URL_REPLACEMENTS = [(__pattern__, r'https://www.tusfiles.net/go/\g/')] + URL_REPLACEMENTS = [(__pattern__, r'https://www.tusfiles.net/go/\g/')] def loadPage(self, page_n): return self.load(urljoin(self.pyfile.url, str(page_n)), decode=True) -- cgit v1.2.3 From 48c0c42fd6faffc56432d5f037cd575979f180cc Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 14 Jul 2014 02:23:37 +0200 Subject: Removed all @author flags + key attributes cleanup for internal & hooks plugins --- module/plugins/crypter/TusfilesNetFolder.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'module/plugins/crypter/TusfilesNetFolder.py') diff --git a/module/plugins/crypter/TusfilesNetFolder.py b/module/plugins/crypter/TusfilesNetFolder.py index 5ee32379d..59aef3372 100644 --- a/module/plugins/crypter/TusfilesNetFolder.py +++ b/module/plugins/crypter/TusfilesNetFolder.py @@ -12,8 +12,6 @@ # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -# -# @author: Walter Purcaro ############################################################################### import math -- cgit v1.2.3 From 8e47b0de30a25d0fd5dfb518bfe4e1e7beff93fd Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 15 Jul 2014 16:27:44 +0200 Subject: Key attributes cleanup for account, container and crypter plugins --- module/plugins/crypter/TusfilesNetFolder.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'module/plugins/crypter/TusfilesNetFolder.py') diff --git a/module/plugins/crypter/TusfilesNetFolder.py b/module/plugins/crypter/TusfilesNetFolder.py index 59aef3372..70b7bd4b9 100644 --- a/module/plugins/crypter/TusfilesNetFolder.py +++ b/module/plugins/crypter/TusfilesNetFolder.py @@ -23,9 +23,11 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter class TusfilesNetFolder(SimpleCrypter): __name__ = "TusfilesNetFolder" + __version__ = "0.02" __type__ = "crypter" + __pattern__ = r'https?://(?:www\.)?tusfiles\.net/go/(?P\w+)/?' - __version__ = "0.02" + __description__ = """Tusfiles.net folder decrypter plugin""" __author_name__ = ("Walter Purcaro", "stickell") __author_mail__ = ("vuolter@gmail.com", "l.stickell@yahoo.it") @@ -36,6 +38,7 @@ class TusfilesNetFolder(SimpleCrypter): URL_REPLACEMENTS = [(__pattern__, r'https://www.tusfiles.net/go/\g/')] + def loadPage(self, page_n): return self.load(urljoin(self.pyfile.url, str(page_n)), decode=True) -- cgit v1.2.3 From ba916633f2bedb04c7358000b91aed69f52e8e43 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 1 Aug 2014 19:35:59 +0200 Subject: Remove trailing whitespaces + remove license headers + import urllib methods directly + sort and fix key attributes + use save_join instead join + sort some import declarations + other minor code cosmetics --- module/plugins/crypter/TusfilesNetFolder.py | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'module/plugins/crypter/TusfilesNetFolder.py') diff --git a/module/plugins/crypter/TusfilesNetFolder.py b/module/plugins/crypter/TusfilesNetFolder.py index 70b7bd4b9..f51c2b715 100644 --- a/module/plugins/crypter/TusfilesNetFolder.py +++ b/module/plugins/crypter/TusfilesNetFolder.py @@ -1,18 +1,4 @@ # -*- coding: utf-8 -*- -############################################################################### -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -############################################################################### import math import re @@ -23,8 +9,8 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter class TusfilesNetFolder(SimpleCrypter): __name__ = "TusfilesNetFolder" - __version__ = "0.02" __type__ = "crypter" + __version__ = "0.02" __pattern__ = r'https?://(?:www\.)?tusfiles\.net/go/(?P\w+)/?' -- cgit v1.2.3 From 6f08566dd6c75d76f5cd2c1dc835e0c22838780f Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 6 Oct 2014 14:49:16 +0200 Subject: Update SimpleCrypter based plugins --- module/plugins/crypter/TusfilesNetFolder.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/crypter/TusfilesNetFolder.py') diff --git a/module/plugins/crypter/TusfilesNetFolder.py b/module/plugins/crypter/TusfilesNetFolder.py index f51c2b715..7ce636d2d 100644 --- a/module/plugins/crypter/TusfilesNetFolder.py +++ b/module/plugins/crypter/TusfilesNetFolder.py @@ -10,7 +10,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter class TusfilesNetFolder(SimpleCrypter): __name__ = "TusfilesNetFolder" __type__ = "crypter" - __version__ = "0.02" + __version__ = "0.03" __pattern__ = r'https?://(?:www\.)?tusfiles\.net/go/(?P\w+)/?' @@ -19,8 +19,8 @@ class TusfilesNetFolder(SimpleCrypter): __author_mail__ = ("vuolter@gmail.com", "l.stickell@yahoo.it") LINK_PATTERN = r'' - TITLE_PATTERN = r'.*?\: (?P<title>.+) folder' - PAGES_PATTERN = r'>\((?P\d+) \w+\)<' + TITLE_PATTERN = r'.*?\: (.+) folder' + PAGES_PATTERN = r'>\((\d+) \w+\)<' URL_REPLACEMENTS = [(__pattern__, r'https://www.tusfiles.net/go/\g/')] -- cgit v1.2.3 From b0868ae6446078bacf1635dde5e4ab316b4a94cb Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 7 Oct 2014 18:57:59 +0200 Subject: New __authors__ key replaces __author_name__ and __author_mail__ + Whitespaces and EOF fixup --- module/plugins/crypter/TusfilesNetFolder.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'module/plugins/crypter/TusfilesNetFolder.py') diff --git a/module/plugins/crypter/TusfilesNetFolder.py b/module/plugins/crypter/TusfilesNetFolder.py index 7ce636d2d..a295189fd 100644 --- a/module/plugins/crypter/TusfilesNetFolder.py +++ b/module/plugins/crypter/TusfilesNetFolder.py @@ -15,8 +15,9 @@ class TusfilesNetFolder(SimpleCrypter): __pattern__ = r'https?://(?:www\.)?tusfiles\.net/go/(?P\w+)/?' __description__ = """Tusfiles.net folder decrypter plugin""" - __author_name__ = ("Walter Purcaro", "stickell") - __author_mail__ = ("vuolter@gmail.com", "l.stickell@yahoo.it") + __authors__ = [("Walter Purcaro", "vuolter@gmail.com"), + ("stickell", "l.stickell@yahoo.it")] + LINK_PATTERN = r'' TITLE_PATTERN = r'.*?\: (.+) folder' -- cgit v1.2.3 From ae7a7e66981456e5bbe2b54006d79b6f907be7a4 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 8 Oct 2014 20:18:13 +0200 Subject: Add __license__ key attribute to plugins --- module/plugins/crypter/TusfilesNetFolder.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/crypter/TusfilesNetFolder.py') diff --git a/module/plugins/crypter/TusfilesNetFolder.py b/module/plugins/crypter/TusfilesNetFolder.py index a295189fd..a6e76adb8 100644 --- a/module/plugins/crypter/TusfilesNetFolder.py +++ b/module/plugins/crypter/TusfilesNetFolder.py @@ -15,6 +15,7 @@ class TusfilesNetFolder(SimpleCrypter): __pattern__ = r'https?://(?:www\.)?tusfiles\.net/go/(?P\w+)/?' __description__ = """Tusfiles.net folder decrypter plugin""" + __license__ = "GPLv3" __authors__ = [("Walter Purcaro", "vuolter@gmail.com"), ("stickell", "l.stickell@yahoo.it")] -- cgit v1.2.3 From 18836967d39d0b6e6f2aeea4e6aece605246a2bf Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 17 Oct 2014 20:55:00 +0200 Subject: Spare code cosmetics --- module/plugins/crypter/TusfilesNetFolder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/crypter/TusfilesNetFolder.py') diff --git a/module/plugins/crypter/TusfilesNetFolder.py b/module/plugins/crypter/TusfilesNetFolder.py index a6e76adb8..1d804c2a8 100644 --- a/module/plugins/crypter/TusfilesNetFolder.py +++ b/module/plugins/crypter/TusfilesNetFolder.py @@ -12,7 +12,7 @@ class TusfilesNetFolder(SimpleCrypter): __type__ = "crypter" __version__ = "0.03" - __pattern__ = r'https?://(?:www\.)?tusfiles\.net/go/(?P\w+)/?' + __pattern__ = r'https?://(?:www\.)?tusfiles\.net/go/(?P\w+)' __description__ = """Tusfiles.net folder decrypter plugin""" __license__ = "GPLv3" -- cgit v1.2.3 From be5a34a74c7126dd9606e646cd879369dac7404d Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 18 Oct 2014 13:50:09 +0200 Subject: Convert some crypters to use XFSPCrypter instead SimpleCrypter --- module/plugins/crypter/TusfilesNetFolder.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'module/plugins/crypter/TusfilesNetFolder.py') diff --git a/module/plugins/crypter/TusfilesNetFolder.py b/module/plugins/crypter/TusfilesNetFolder.py index 1d804c2a8..fb0842b63 100644 --- a/module/plugins/crypter/TusfilesNetFolder.py +++ b/module/plugins/crypter/TusfilesNetFolder.py @@ -4,13 +4,13 @@ import math import re from urlparse import urljoin -from module.plugins.internal.SimpleCrypter import SimpleCrypter +from module.plugins.internal.XFSPCrypter import XFSPCrypter -class TusfilesNetFolder(SimpleCrypter): +class TusfilesNetFolder(XFSPCrypter): __name__ = "TusfilesNetFolder" __type__ = "crypter" - __version__ = "0.03" + __version__ = "0.04" __pattern__ = r'https?://(?:www\.)?tusfiles\.net/go/(?P\w+)' @@ -20,8 +20,8 @@ class TusfilesNetFolder(SimpleCrypter): ("stickell", "l.stickell@yahoo.it")] - LINK_PATTERN = r'' - TITLE_PATTERN = r'.*?\: (.+) folder' + HOSTER_NAME = "tusfiles.net" + PAGES_PATTERN = r'>\((\d+) \w+\)<' URL_REPLACEMENTS = [(__pattern__, r'https://www.tusfiles.net/go/\g/')] @@ -30,6 +30,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: -- cgit v1.2.3 From 885f8ed782e64d9e73367905e642a84d0a8999f1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 28 Oct 2014 04:01:38 +0100 Subject: Update __config__ --- module/plugins/crypter/TusfilesNetFolder.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'module/plugins/crypter/TusfilesNetFolder.py') diff --git a/module/plugins/crypter/TusfilesNetFolder.py b/module/plugins/crypter/TusfilesNetFolder.py index fb0842b63..3a9ab3ba9 100644 --- a/module/plugins/crypter/TusfilesNetFolder.py +++ b/module/plugins/crypter/TusfilesNetFolder.py @@ -13,6 +13,8 @@ class TusfilesNetFolder(XFSPCrypter): __version__ = "0.04" __pattern__ = r'https?://(?:www\.)?tusfiles\.net/go/(?P\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""" __license__ = "GPLv3" -- cgit v1.2.3 From 34984dae733c3f3d47b41a0acfba3724d53c65a1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 28 Oct 2014 16:52:10 +0100 Subject: Code cosmetics: plugin class attributes --- module/plugins/crypter/TusfilesNetFolder.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'module/plugins/crypter/TusfilesNetFolder.py') diff --git a/module/plugins/crypter/TusfilesNetFolder.py b/module/plugins/crypter/TusfilesNetFolder.py index 3a9ab3ba9..73b8b6a2b 100644 --- a/module/plugins/crypter/TusfilesNetFolder.py +++ b/module/plugins/crypter/TusfilesNetFolder.py @@ -8,8 +8,8 @@ from module.plugins.internal.XFSPCrypter import XFSPCrypter class TusfilesNetFolder(XFSPCrypter): - __name__ = "TusfilesNetFolder" - __type__ = "crypter" + __name__ = "TusfilesNetFolder" + __type__ = "crypter" __version__ = "0.04" __pattern__ = r'https?://(?:www\.)?tusfiles\.net/go/(?P\w+)' @@ -17,9 +17,9 @@ class TusfilesNetFolder(XFSPCrypter): ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] __description__ = """Tusfiles.net folder decrypter plugin""" - __license__ = "GPLv3" - __authors__ = [("Walter Purcaro", "vuolter@gmail.com"), - ("stickell", "l.stickell@yahoo.it")] + __license__ = "GPLv3" + __authors__ = [("Walter Purcaro", "vuolter@gmail.com"), + ("stickell", "l.stickell@yahoo.it")] HOSTER_NAME = "tusfiles.net" -- cgit v1.2.3 From 772e47ef806d18fd209e910be0535bce7c07dc7b Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 2 Nov 2014 22:47:07 +0100 Subject: Update all other plugins --- module/plugins/crypter/TusfilesNetFolder.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/crypter/TusfilesNetFolder.py') diff --git a/module/plugins/crypter/TusfilesNetFolder.py b/module/plugins/crypter/TusfilesNetFolder.py index 73b8b6a2b..7c1375f93 100644 --- a/module/plugins/crypter/TusfilesNetFolder.py +++ b/module/plugins/crypter/TusfilesNetFolder.py @@ -4,13 +4,13 @@ import math import re from urlparse import urljoin -from module.plugins.internal.XFSPCrypter import XFSPCrypter +from module.plugins.internal.XFSCrypter import XFSCrypter -class TusfilesNetFolder(XFSPCrypter): +class TusfilesNetFolder(XFSCrypter): __name__ = "TusfilesNetFolder" __type__ = "crypter" - __version__ = "0.04" + __version__ = "0.05" __pattern__ = r'https?://(?:www\.)?tusfiles\.net/go/(?P\w+)' __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), @@ -22,7 +22,7 @@ class TusfilesNetFolder(XFSPCrypter): ("stickell", "l.stickell@yahoo.it")] - HOSTER_NAME = "tusfiles.net" + HOSTER_DOMAIN = "tusfiles.net" PAGES_PATTERN = r'>\((\d+) \w+\)<' -- cgit v1.2.3 From ae15749449563f5adaabd250ea62460c18af6498 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 3 Nov 2014 12:16:40 +0100 Subject: Update crypters --- module/plugins/crypter/TusfilesNetFolder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/crypter/TusfilesNetFolder.py') diff --git a/module/plugins/crypter/TusfilesNetFolder.py b/module/plugins/crypter/TusfilesNetFolder.py index 7c1375f93..e8da59736 100644 --- a/module/plugins/crypter/TusfilesNetFolder.py +++ b/module/plugins/crypter/TusfilesNetFolder.py @@ -10,7 +10,7 @@ from module.plugins.internal.XFSCrypter import XFSCrypter class TusfilesNetFolder(XFSCrypter): __name__ = "TusfilesNetFolder" __type__ = "crypter" - __version__ = "0.05" + __version__ = "0.06" __pattern__ = r'https?://(?:www\.)?tusfiles\.net/go/(?P\w+)' __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), @@ -42,4 +42,4 @@ class TusfilesNetFolder(XFSCrypter): for p in xrange(2, pages + 1): self.html = self.loadPage(p) - self.package_links += self.getLinks() + self.links += self.getLinks() -- cgit v1.2.3 From 2ca8cc959a587992dc389d6baf71dd3e4f66df1c Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 23 Nov 2014 04:41:17 +0100 Subject: Fix some URL_REPLACEMENTS --- module/plugins/crypter/TusfilesNetFolder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/crypter/TusfilesNetFolder.py') diff --git a/module/plugins/crypter/TusfilesNetFolder.py b/module/plugins/crypter/TusfilesNetFolder.py index e8da59736..9533a6e76 100644 --- a/module/plugins/crypter/TusfilesNetFolder.py +++ b/module/plugins/crypter/TusfilesNetFolder.py @@ -10,7 +10,7 @@ from module.plugins.internal.XFSCrypter import XFSCrypter class TusfilesNetFolder(XFSCrypter): __name__ = "TusfilesNetFolder" __type__ = "crypter" - __version__ = "0.06" + __version__ = "0.07" __pattern__ = r'https?://(?:www\.)?tusfiles\.net/go/(?P\w+)' __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), @@ -26,7 +26,7 @@ class TusfilesNetFolder(XFSCrypter): PAGES_PATTERN = r'>\((\d+) \w+\)<' - URL_REPLACEMENTS = [(__pattern__, r'https://www.tusfiles.net/go/\g/')] + URL_REPLACEMENTS = [(__pattern__ + ".*", r'https://www.tusfiles.net/go/\g/')] def loadPage(self, page_n): -- cgit v1.2.3 From 0f530be2642c63759cb6156866f1d4ab119760da Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 12 Dec 2014 20:33:34 +0100 Subject: Fix missing create_getInfo --- module/plugins/crypter/TusfilesNetFolder.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'module/plugins/crypter/TusfilesNetFolder.py') diff --git a/module/plugins/crypter/TusfilesNetFolder.py b/module/plugins/crypter/TusfilesNetFolder.py index 9533a6e76..0db3470cc 100644 --- a/module/plugins/crypter/TusfilesNetFolder.py +++ b/module/plugins/crypter/TusfilesNetFolder.py @@ -4,7 +4,7 @@ import math import re from urlparse import urljoin -from module.plugins.internal.XFSCrypter import XFSCrypter +from module.plugins.internal.XFSCrypter import XFSCrypter, create_getInfo class TusfilesNetFolder(XFSCrypter): @@ -43,3 +43,6 @@ class TusfilesNetFolder(XFSCrypter): for p in xrange(2, pages + 1): self.html = self.loadPage(p) self.links += self.getLinks() + + +getInfo = create_getInfo(TusfilesNetFolder) -- cgit v1.2.3