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(-) 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["\'][^>]*>(.*?)