diff --git a/app/filter.py b/app/filter.py index 355b358..3a80535 100644 --- a/app/filter.py +++ b/app/filter.py @@ -29,9 +29,12 @@ unsupported_g_pages = [ 'google.com/preferences', 'google.com/intl', 'advanced_search', - 'tbm=shop' + 'tbm=shop', + 'ageverification.google.co.kr' ] +unsupported_g_divs = ['google.com/preferences?hl=', 'ageverification.google.co.kr'] + def extract_q(q_str: str, href: str) -> str: """Extracts the 'q' element from a result link. This is typically @@ -554,7 +557,7 @@ class Filter: link['href'] = link_netloc parent = link.parent - if 'google.com/preferences?hl=' in link_netloc: + if any(divlink in link_netloc for divlink in unsupported_g_divs): # Handle case where a search is performed in a different # language than what is configured. This usually returns a # div with the same classes as normal search results, but with