From c5dec902facfaf77474d0cdf114ff9d5f6a66f36 Mon Sep 17 00:00:00 2001 From: Stefano Date: Tue, 5 Mar 2013 21:32:51 +0100 Subject: XFileSharingPro: little fix + new captcha service Implemented the solvemedia captcha service. Some hosters uses different level of heading. --- module/plugins/hoster/XFileSharingPro.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'module/plugins') diff --git a/module/plugins/hoster/XFileSharingPro.py b/module/plugins/hoster/XFileSharingPro.py index ac3e1d5de..1120a2a8b 100644 --- a/module/plugins/hoster/XFileSharingPro.py +++ b/module/plugins/hoster/XFileSharingPro.py @@ -23,6 +23,7 @@ from urlparse import urlparse from pycurl import FOLLOWLOCATION, LOW_SPEED_TIME from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, PluginParseError from module.plugins.ReCaptcha import ReCaptcha +from module.plugins.internal.CaptchaService import SolveMedia, AdsCaptcha from module.utils import html_unescape class XFileSharingPro(SimpleHoster): @@ -34,7 +35,7 @@ class XFileSharingPro(SimpleHoster): __name__ = "XFileSharingPro" __type__ = "hoster" __pattern__ = r"^unmatchable$" - __version__ = "0.16" + __version__ = "0.17" __description__ = """XFileSharingPro common hoster base""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") @@ -42,7 +43,7 @@ class XFileSharingPro(SimpleHoster): FILE_NAME_PATTERN = r'[^<]+ \((?P[^<]+)\)' FILE_INFO_PATTERN = r'Filename:(?P[^<]+)\s*.*?\((?P[^<]+)\)' - FILE_OFFLINE_PATTERN = r'<(b|h2)>File Not Found' + FILE_OFFLINE_PATTERN = r'<(b|h[1-6])>File Not Found' WAIT_PATTERN = r'.*?>(\d+)' LONG_WAIT_PATTERN = r'(?P\d+(?=\s*hour))?.*?(?P\d+(?=\s*minute))?.*?(?P\d+(?=\s*second))?' @@ -51,6 +52,7 @@ class XFileSharingPro(SimpleHoster): CAPTCHA_URL_PATTERN = r'(http://[^"\']+?/captchas?/[^"\']+)' RECAPTCHA_URL_PATTERN = r'http://[^"\']+?recaptcha[^"\']+?\?k=([^"\']+)"' CAPTCHA_DIV_PATTERN = r'Enter code.*?(.*?)' + SOLVEMEDIA_PATTERN = r'http:\/\/api\.solvemedia\.com\/papi\/challenge\.script\?k=(.*?)"' ERROR_PATTERN = r'class=["\']err["\'][^>]*>(.*?) Date: Tue, 5 Mar 2013 21:34:19 +0100 Subject: New hoster: ShareFilesCo --- module/plugins/hoster/ShareFilesCo.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 module/plugins/hoster/ShareFilesCo.py (limited to 'module/plugins') diff --git a/module/plugins/hoster/ShareFilesCo.py b/module/plugins/hoster/ShareFilesCo.py new file mode 100644 index 000000000..ee44b0a1f --- /dev/null +++ b/module/plugins/hoster/ShareFilesCo.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +from module.plugins.hoster.XFileSharingPro import XFileSharingPro, create_getInfo +import re + +class ShareFilesCo(XFileSharingPro): + __name__ = "ShareFilesCo" + __type__ = "hoster" + __pattern__ = r"http://(www\.)?sharefiles\.co/\w{12}" + __version__ = "0.01" + __description__ = """Sharefiles.co hoster plugin""" + __author_name__ = ("stickell") + __author_mail__ = ("l.stickell@yahoo.it") + + HOSTER_NAME = "sharefiles.co" + + def startDownload(self, link): + link = link.strip() + if link.startswith('http://adf.ly'): + link = re.sub('http://adf.ly/\d+/', '', link) + if self.captcha: self.correctCaptcha() + self.logDebug('DIRECT LINK: %s' % link) + self.download(link) + +getInfo = create_getInfo(ShareFilesCo) -- cgit v1.2.3 From 38872d9cdd0d659e9d92fccad01852dd47af8457 Mon Sep 17 00:00:00 2001 From: Stefano Date: Tue, 5 Mar 2013 21:35:46 +0100 Subject: New account plugin for ShareFilesCo --- module/plugins/accounts/ShareFilesCo.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 module/plugins/accounts/ShareFilesCo.py (limited to 'module/plugins') diff --git a/module/plugins/accounts/ShareFilesCo.py b/module/plugins/accounts/ShareFilesCo.py new file mode 100644 index 000000000..0d8ea6635 --- /dev/null +++ b/module/plugins/accounts/ShareFilesCo.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- +from module.plugins.internal.XFSPAccount import XFSPAccount + +class ShareFilesCo(XFSPAccount): + __name__ = "ShareFilesCo" + __version__ = "0.01" + __type__ = "account" + __description__ = """ShareFilesCo account plugin""" + __author_name__ = ("stickell") + __author_mail__ = ("l.stickell@yahoo.it") + + MAIN_PAGE = "http://sharefiles.co/" -- cgit v1.2.3