From 3b52a1537e599efca78da3ca89306a5b0f5081de Mon Sep 17 00:00:00 2001 From: Stefano Date: Mon, 1 Apr 2013 15:16:02 +0200 Subject: RarefileNet: added pattern to support premium downloads --- module/plugins/hoster/RarefileNet.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/module/plugins/hoster/RarefileNet.py b/module/plugins/hoster/RarefileNet.py index 7c5543cc8..a0f5930b5 100644 --- a/module/plugins/hoster/RarefileNet.py +++ b/module/plugins/hoster/RarefileNet.py @@ -1,30 +1,34 @@ # -*- coding: utf-8 -*- + import re + from module.plugins.hoster.XFileSharingPro import XFileSharingPro, create_getInfo from module.utils import html_unescape + class RarefileNet(XFileSharingPro): __name__ = "RarefileNet" __type__ = "hoster" __pattern__ = r"http://(?:\w*\.)*rarefile.net/\w{12}" - __version__ = "0.02" + __version__ = "0.03" __description__ = """Rarefile.net hoster plugin""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") - + FILE_NAME_PATTERN = r'(?P.*?)' FILE_SIZE_PATTERN = r'Size : (?P.+?) ' + DIRECT_LINK_PATTERN = r'(?P=link)' HOSTER_NAME = "rarefile.net" - + def setup(self): - self.resumeDownload = self.multiDL = self.premium - + self.resumeDownload = self.multiDL = self.premium + def handleCaptcha(self, inputs): captcha_div = re.search(r'Enter code.*?(.*?)', self.html, re.S).group(1) - self.logDebug(captcha_div) + self.logDebug(captcha_div) numerals = re.findall('(\d)', 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) + self.logDebug("CAPTCHA", inputs['code'], numerals) return 3 -getInfo = create_getInfo(RarefileNet) \ No newline at end of file +getInfo = create_getInfo(RarefileNet) -- cgit v1.2.3