@@ -10,9 +10,10 @@
10 @parse url, title, content
10 @parse url, title, content
13−from urllib.parse import urlencode, urljoin
13+from urllib.parse import urlencode, urljoin, urlparse
14from lxml import html
14from lxml import html
15from searx.utils import extract_text
15from searx.utils import extract_text
16+from searx.exceptions import SearxEngineCaptchaException
17# engine dependent config
18# engine dependent config
18categories = ['it']
19categories = ['it']
@@ -37,6 +38,10 @@ def request(query, params):
38# get response from search-request
39# get response from search-request
39def response(resp):
40def response(resp):
41+ resp_url = urlparse(resp.url)
42+ if resp_url.path.startswith('/nocaptcha'):
43+ raise SearxEngineCaptchaException()
40 results = []
45 results = []
42 dom = html.fromstring(resp.text)
47 dom = html.fromstring(resp.text)