Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def get_search_link_variants(link_text):
"""
Lists possible interpretations of link text on search page.
Used for determining whether a search page entry matches the search term.
"""
return clear_text(link_text).split(', ')
('Läufchen', 'Laeufchen'),
('Läufel', 'Laeufel')],
'Im Alphabet danach': [('laufend', 'laufend'),
('laufen lassen, laufenlassen', 'laufen_lassen'),
('Laufer', 'Laufer'),
('Läufer', 'Laeufer'),
('Lauferei', 'Lauferei')]}
"""
result = {}
section = self.soup.find('div', id='block-beforeafterblock-2')
for group in section.find_all('nav', class_='hookup__group'):
h3title = group.h3.text
result[h3title] = []
for item in group.find_all('li'):
link = item.a.attrs['href'].split('/')[-1]
result[h3title].append((clear_text(item.text), link))
return result