@@ -10,9 +10,10 @@
1010 @parse url, title, content
1111"""
1212
13−from urllib.parse import urlencode, urljoin
13+from urllib.parse import urlencode, urljoin, urlparse
1414from lxml import html
1515from searx.utils import extract_text
16+from searx.exceptions import SearxEngineCaptchaException
1617
1718# engine dependent config
1819categories = ['it']
@@ -37,6 +38,10 @@ def request(query, params):
3738
3839# get response from search-request
3940def response(resp):
41+ resp_url = urlparse(resp.url)
42+ if resp_url.path.startswith('/nocaptcha'):
43+ raise SearxEngineCaptchaException()
44+
4045 results = []
4146
4247 dom = html.fromstring(resp.text)