SyntaxFix
Write A Post
Hire A Developer
Questions
Try this
li = soup.find('li', {'class': 'text'}) children = li.findChildren("a" , recursive=False) for child in children: print(child)