|  | 
 |  | 
 | 
												
													
														| 9 |  # @parse       url, title, content, suggestion
 | 9 |  # @parse       url, title, content, suggestion
 | 
												
													
														| 10 |  
 | 10 |  
 | 
												
													
														| 11 |  import re
 | 11 |  import re
 | 
												
													
														|  | 
 | 12 | +from flask_babel import gettext
 | 
												
													
														| 12 |  from lxml import html, etree
 | 13 |  from lxml import html, etree
 | 
												
													
														| 13 |  from searx.engines.xpath import extract_text, extract_url
 | 14 |  from searx.engines.xpath import extract_text, extract_url
 | 
												
													
														| 14 |  from searx import logger
 | 15 |  from searx import logger
 | 
												
											
												
													
														|  | 
 |  | 
 | 
												
													
														| 209 |      if resp_url.netloc == 'sorry.google.com' or resp_url.path == '/sorry/IndexRedirect':
 | 210 |      if resp_url.netloc == 'sorry.google.com' or resp_url.path == '/sorry/IndexRedirect':
 | 
												
													
														| 210 |          raise RuntimeWarning('sorry.google.com')
 | 211 |          raise RuntimeWarning('sorry.google.com')
 | 
												
													
														| 211 |  
 | 212 |  
 | 
												
													
														|  | 
 | 213 | +    if resp_url.path.startswith('/sorry'):
 | 
												
													
														|  | 
 | 214 | +        raise RuntimeWarning(gettext('CAPTCHA required'))
 | 
												
													
														|  | 
 | 215 | +
 | 
												
													
														| 212 |      # which hostname ?
 | 216 |      # which hostname ?
 | 
												
													
														| 213 |      google_hostname = resp.search_params.get('google_hostname')
 | 217 |      google_hostname = resp.search_params.get('google_hostname')
 | 
												
													
														| 214 |      google_url = "https://" + google_hostname
 | 218 |      google_url = "https://" + google_hostname
 |