From 04038a2cf0c4c2d9cc9a0c8e8bf9beb6426afae8 Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@gmail.com> Date: Thu, 10 Jul 2014 03:02:26 +0200 Subject: Use parseError instead PluginParseError + unified all download pattern attributes as LINK_PATTERN + removed some old patterns (not used anymore) + other code cosmetics --- module/plugins/hoster/RarefileNet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/RarefileNet.py') diff --git a/module/plugins/hoster/RarefileNet.py b/module/plugins/hoster/RarefileNet.py index 8f2aacbcf..7dd4164f6 100644 --- a/module/plugins/hoster/RarefileNet.py +++ b/module/plugins/hoster/RarefileNet.py @@ -19,7 +19,7 @@ class RarefileNet(XFileSharingPro): FILE_NAME_PATTERN = r'<td><font color="red">(?P<N>.*?)</font></td>' FILE_SIZE_PATTERN = r'<td>Size : (?P<S>.+?) ' - DIRECT_LINK_PATTERN = r'<a href="(?P<link>[^"]+)">(?P=link)</a>' + LINK_PATTERN = r'<a href="(?P<link>[^"]+)">(?P=link)</a>' def setup(self): self.resumeDownload = self.multiDL = self.premium -- cgit v1.2.3 From ba916633f2bedb04c7358000b91aed69f52e8e43 Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@gmail.com> 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/hoster/RarefileNet.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'module/plugins/hoster/RarefileNet.py') diff --git a/module/plugins/hoster/RarefileNet.py b/module/plugins/hoster/RarefileNet.py index 7dd4164f6..51df5c882 100644 --- a/module/plugins/hoster/RarefileNet.py +++ b/module/plugins/hoster/RarefileNet.py @@ -9,8 +9,10 @@ from module.utils import html_unescape class RarefileNet(XFileSharingPro): __name__ = "RarefileNet" __type__ = "hoster" - __pattern__ = r'http://(?:www\.)?rarefile.net/\w{12}' __version__ = "0.03" + + __pattern__ = r'http://(?:www\.)?rarefile.net/\w{12}' + __description__ = """Rarefile.net hoster plugin""" __author_name__ = "zoidberg" __author_mail__ = "zoidberg@mujmail.cz" @@ -21,6 +23,7 @@ class RarefileNet(XFileSharingPro): FILE_SIZE_PATTERN = r'<td>Size : (?P<S>.+?) ' LINK_PATTERN = r'<a href="(?P<link>[^"]+)">(?P=link)</a>' + def setup(self): self.resumeDownload = self.multiDL = self.premium -- cgit v1.2.3 From 390f7deca39ba14f698b3c56660eee2a5502b79a Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@gmail.com> Date: Sun, 28 Sep 2014 16:50:29 +0200 Subject: Cleaned-up XFileSharingPro based plugins --- module/plugins/hoster/RarefileNet.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster/RarefileNet.py') diff --git a/module/plugins/hoster/RarefileNet.py b/module/plugins/hoster/RarefileNet.py index 51df5c882..9148ee24e 100644 --- a/module/plugins/hoster/RarefileNet.py +++ b/module/plugins/hoster/RarefileNet.py @@ -11,21 +11,20 @@ class RarefileNet(XFileSharingPro): __type__ = "hoster" __version__ = "0.03" - __pattern__ = r'http://(?:www\.)?rarefile.net/\w{12}' + __pattern__ = r'http://(?:www\.)?rarefile\.net/\w{12}' __description__ = """Rarefile.net hoster plugin""" __author_name__ = "zoidberg" __author_mail__ = "zoidberg@mujmail.cz" + HOSTER_NAME = "rarefile.net" FILE_NAME_PATTERN = r'<td><font color="red">(?P<N>.*?)</font></td>' FILE_SIZE_PATTERN = r'<td>Size : (?P<S>.+?) ' - LINK_PATTERN = r'<a href="(?P<link>[^"]+)">(?P=link)</a>' + LINK_PATTERN = r'<a href="(?P<link>[^"]+)">(?P=link)</a>' - def setup(self): - self.resumeDownload = self.multiDL = self.premium def handleCaptcha(self, inputs): captcha_div = re.search(r'<b>Enter code.*?<div.*?>(.*?)</div>', self.html, re.S).group(1) -- cgit v1.2.3 From b0868ae6446078bacf1635dde5e4ab316b4a94cb Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@gmail.com> 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/hoster/RarefileNet.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'module/plugins/hoster/RarefileNet.py') diff --git a/module/plugins/hoster/RarefileNet.py b/module/plugins/hoster/RarefileNet.py index 9148ee24e..a51284c19 100644 --- a/module/plugins/hoster/RarefileNet.py +++ b/module/plugins/hoster/RarefileNet.py @@ -14,8 +14,7 @@ class RarefileNet(XFileSharingPro): __pattern__ = r'http://(?:www\.)?rarefile\.net/\w{12}' __description__ = """Rarefile.net hoster plugin""" - __author_name__ = "zoidberg" - __author_mail__ = "zoidberg@mujmail.cz" + __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] HOSTER_NAME = "rarefile.net" -- cgit v1.2.3 From 60320d4addec35b9cbd14a05b6c33fba63d6c620 Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@gmail.com> Date: Wed, 8 Oct 2014 16:14:33 +0200 Subject: Update plugins XFileSharingPro based --- module/plugins/hoster/RarefileNet.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/RarefileNet.py') diff --git a/module/plugins/hoster/RarefileNet.py b/module/plugins/hoster/RarefileNet.py index a51284c19..1c5f66b30 100644 --- a/module/plugins/hoster/RarefileNet.py +++ b/module/plugins/hoster/RarefileNet.py @@ -2,14 +2,14 @@ import re -from module.plugins.hoster.XFileSharingPro import XFileSharingPro, create_getInfo +from module.plugins.hoster.XFSPHoster import XFSPHoster, create_getInfo from module.utils import html_unescape -class RarefileNet(XFileSharingPro): +class RarefileNet(XFSPHoster): __name__ = "RarefileNet" __type__ = "hoster" - __version__ = "0.03" + __version__ = "0.04" __pattern__ = r'http://(?:www\.)?rarefile\.net/\w{12}' -- cgit v1.2.3 From 355c80c5e456f22a4fd3247985710a46a43a79f9 Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@gmail.com> Date: Wed, 8 Oct 2014 19:51:40 +0200 Subject: Fix previous plugins update --- module/plugins/hoster/RarefileNet.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/RarefileNet.py') diff --git a/module/plugins/hoster/RarefileNet.py b/module/plugins/hoster/RarefileNet.py index 1c5f66b30..fab0f2aaf 100644 --- a/module/plugins/hoster/RarefileNet.py +++ b/module/plugins/hoster/RarefileNet.py @@ -2,14 +2,14 @@ import re -from module.plugins.hoster.XFSPHoster import XFSPHoster, create_getInfo +from module.plugins.internal.XFSPHoster import XFSPHoster, create_getInfo from module.utils import html_unescape class RarefileNet(XFSPHoster): __name__ = "RarefileNet" __type__ = "hoster" - __version__ = "0.04" + __version__ = "0.05" __pattern__ = r'http://(?:www\.)?rarefile\.net/\w{12}' -- cgit v1.2.3 From ae7a7e66981456e5bbe2b54006d79b6f907be7a4 Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@gmail.com> Date: Wed, 8 Oct 2014 20:18:13 +0200 Subject: Add __license__ key attribute to plugins --- module/plugins/hoster/RarefileNet.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/hoster/RarefileNet.py') diff --git a/module/plugins/hoster/RarefileNet.py b/module/plugins/hoster/RarefileNet.py index fab0f2aaf..03c322c2b 100644 --- a/module/plugins/hoster/RarefileNet.py +++ b/module/plugins/hoster/RarefileNet.py @@ -14,6 +14,7 @@ class RarefileNet(XFSPHoster): __pattern__ = r'http://(?:www\.)?rarefile\.net/\w{12}' __description__ = """Rarefile.net hoster plugin""" + __license__ = "GPLv3" __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] -- cgit v1.2.3 From 34984dae733c3f3d47b41a0acfba3724d53c65a1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@gmail.com> Date: Tue, 28 Oct 2014 16:52:10 +0100 Subject: Code cosmetics: plugin class attributes --- module/plugins/hoster/RarefileNet.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster/RarefileNet.py') diff --git a/module/plugins/hoster/RarefileNet.py b/module/plugins/hoster/RarefileNet.py index 03c322c2b..6ed268735 100644 --- a/module/plugins/hoster/RarefileNet.py +++ b/module/plugins/hoster/RarefileNet.py @@ -7,15 +7,15 @@ from module.utils import html_unescape class RarefileNet(XFSPHoster): - __name__ = "RarefileNet" - __type__ = "hoster" + __name__ = "RarefileNet" + __type__ = "hoster" __version__ = "0.05" __pattern__ = r'http://(?:www\.)?rarefile\.net/\w{12}' __description__ = """Rarefile.net hoster plugin""" - __license__ = "GPLv3" - __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] + __license__ = "GPLv3" + __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] HOSTER_NAME = "rarefile.net" -- cgit v1.2.3 From 772e47ef806d18fd209e910be0535bce7c07dc7b Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@gmail.com> Date: Sun, 2 Nov 2014 22:47:07 +0100 Subject: Update all other plugins --- module/plugins/hoster/RarefileNet.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'module/plugins/hoster/RarefileNet.py') diff --git a/module/plugins/hoster/RarefileNet.py b/module/plugins/hoster/RarefileNet.py index 6ed268735..f6f9143c5 100644 --- a/module/plugins/hoster/RarefileNet.py +++ b/module/plugins/hoster/RarefileNet.py @@ -2,14 +2,14 @@ import re -from module.plugins.internal.XFSPHoster import XFSPHoster, create_getInfo +from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo from module.utils import html_unescape -class RarefileNet(XFSPHoster): +class RarefileNet(XFSHoster): __name__ = "RarefileNet" __type__ = "hoster" - __version__ = "0.05" + __version__ = "0.06" __pattern__ = r'http://(?:www\.)?rarefile\.net/\w{12}' @@ -18,10 +18,10 @@ class RarefileNet(XFSPHoster): __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - HOSTER_NAME = "rarefile.net" + HOSTER_DOMAIN = "rarefile.net" - FILE_NAME_PATTERN = r'<td><font color="red">(?P<N>.*?)</font></td>' - FILE_SIZE_PATTERN = r'<td>Size : (?P<S>.+?) ' + NAME_PATTERN = r'<td><font color="red">(?P<N>.*?)</font></td>' + SIZE_PATTERN = r'<td>Size : (?P<S>.+?) ' LINK_PATTERN = r'<a href="(?P<link>[^"]+)">(?P=link)</a>' -- cgit v1.2.3 From 770464d0ab27ef948c1b4d97025bc07a4676ab46 Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@gmail.com> Date: Sat, 22 Nov 2014 01:34:52 +0100 Subject: [RarefileNet] Remove old handleCaptcha --- module/plugins/hoster/RarefileNet.py | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'module/plugins/hoster/RarefileNet.py') diff --git a/module/plugins/hoster/RarefileNet.py b/module/plugins/hoster/RarefileNet.py index f6f9143c5..8c6ec43a2 100644 --- a/module/plugins/hoster/RarefileNet.py +++ b/module/plugins/hoster/RarefileNet.py @@ -3,13 +3,12 @@ import re from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo -from module.utils import html_unescape class RarefileNet(XFSHoster): __name__ = "RarefileNet" __type__ = "hoster" - __version__ = "0.06" + __version__ = "0.07" __pattern__ = r'http://(?:www\.)?rarefile\.net/\w{12}' @@ -20,19 +19,7 @@ class RarefileNet(XFSHoster): HOSTER_DOMAIN = "rarefile.net" - NAME_PATTERN = r'<td><font color="red">(?P<N>.*?)</font></td>' - SIZE_PATTERN = r'<td>Size : (?P<S>.+?) ' - LINK_PATTERN = r'<a href="(?P<link>[^"]+)">(?P=link)</a>' - def handleCaptcha(self, inputs): - captcha_div = re.search(r'<b>Enter code.*?<div.*?>(.*?)</div>', self.html, re.S).group(1) - self.logDebug(captcha_div) - numerals = re.findall('<span.*?padding-left\s*:\s*(\d+).*?>(\d)</span>', html_unescape(captcha_div)) - inputs['code'] = "".join([a[1] for a in sorted(numerals, key=lambda num: int(num[0]))]) - self.logDebug("CAPTCHA", inputs['code'], numerals) - return 3 - - getInfo = create_getInfo(RarefileNet) -- cgit v1.2.3 From ed4dd7c759a48f5fa8a4411292cd12a06f662d68 Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@gmail.com> Date: Sat, 22 Nov 2014 05:31:56 +0100 Subject: [RarefileNet] Restore NAME_PATTERN and SIZE_PATTERN --- module/plugins/hoster/RarefileNet.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'module/plugins/hoster/RarefileNet.py') diff --git a/module/plugins/hoster/RarefileNet.py b/module/plugins/hoster/RarefileNet.py index 8c6ec43a2..987028c8f 100644 --- a/module/plugins/hoster/RarefileNet.py +++ b/module/plugins/hoster/RarefileNet.py @@ -8,7 +8,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo class RarefileNet(XFSHoster): __name__ = "RarefileNet" __type__ = "hoster" - __version__ = "0.07" + __version__ = "0.08" __pattern__ = r'http://(?:www\.)?rarefile\.net/\w{12}' @@ -19,6 +19,9 @@ class RarefileNet(XFSHoster): HOSTER_DOMAIN = "rarefile.net" + NAME_PATTERN = r'<font color="red">(?P<N>.+?)<' + SIZE_PATTERN = r'>Size : (?P<S>[\d.,]+) (?P<U>[\w^_]+)' + LINK_PATTERN = r'<a href="(?P<link>[^"]+)">(?P=link)</a>' -- cgit v1.2.3 From f26faa7a68f645f8664874f4ff361caf8503d651 Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@gmail.com> Date: Wed, 17 Dec 2014 23:49:18 +0100 Subject: Update plugins after XFSHoster changes --- module/plugins/hoster/RarefileNet.py | 3 --- 1 file changed, 3 deletions(-) (limited to 'module/plugins/hoster/RarefileNet.py') diff --git a/module/plugins/hoster/RarefileNet.py b/module/plugins/hoster/RarefileNet.py index 987028c8f..e847c7cf3 100644 --- a/module/plugins/hoster/RarefileNet.py +++ b/module/plugins/hoster/RarefileNet.py @@ -19,9 +19,6 @@ class RarefileNet(XFSHoster): HOSTER_DOMAIN = "rarefile.net" - NAME_PATTERN = r'<font color="red">(?P<N>.+?)<' - SIZE_PATTERN = r'>Size : (?P<S>[\d.,]+) (?P<U>[\w^_]+)' - LINK_PATTERN = r'<a href="(?P<link>[^"]+)">(?P=link)</a>' -- cgit v1.2.3 From 854efeb463bd98cb8e22f1f78f5ce97e6c0ab49f Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@gmail.com> Date: Mon, 22 Dec 2014 16:45:04 +0100 Subject: Spare code cosmetics --- module/plugins/hoster/RarefileNet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/RarefileNet.py') diff --git a/module/plugins/hoster/RarefileNet.py b/module/plugins/hoster/RarefileNet.py index e847c7cf3..bc2382dc1 100644 --- a/module/plugins/hoster/RarefileNet.py +++ b/module/plugins/hoster/RarefileNet.py @@ -19,7 +19,7 @@ class RarefileNet(XFSHoster): HOSTER_DOMAIN = "rarefile.net" - LINK_PATTERN = r'<a href="(?P<link>[^"]+)">(?P=link)</a>' + LINK_PATTERN = r'<a href="(.+?)">(?P=\1)</a>' getInfo = create_getInfo(RarefileNet) -- cgit v1.2.3 From e1d4186c62512d8bb76d35b6f8d1828d8d0aa94e Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@gmail.com> Date: Tue, 23 Dec 2014 13:26:32 +0100 Subject: [SimpleHoster] Improve multi-hoster feature --- module/plugins/hoster/RarefileNet.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/RarefileNet.py') diff --git a/module/plugins/hoster/RarefileNet.py b/module/plugins/hoster/RarefileNet.py index bc2382dc1..2be952efe 100644 --- a/module/plugins/hoster/RarefileNet.py +++ b/module/plugins/hoster/RarefileNet.py @@ -8,7 +8,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo class RarefileNet(XFSHoster): __name__ = "RarefileNet" __type__ = "hoster" - __version__ = "0.08" + __version__ = "0.09" __pattern__ = r'http://(?:www\.)?rarefile\.net/\w{12}' @@ -19,7 +19,7 @@ class RarefileNet(XFSHoster): HOSTER_DOMAIN = "rarefile.net" - LINK_PATTERN = r'<a href="(.+?)">(?P=\1)</a>' + LINK_PATTERN = r'<a href="(.+?)">\1</a>' getInfo = create_getInfo(RarefileNet) -- cgit v1.2.3