Answers for "get only parent child elements beautiful soup"

0

children beautiful soup

li = soup.find('li', {'class': 'text'})
children = li.findChildren("a" , recursive=False)
for child in children:
    print child
Posted by: Guest on February-16-2020
0

get only parent child elements beautiful soup

>>> soup.select('li.test > a')
[<a>link1</a>, <a>link3</a>]
Posted by: Guest on November-22-2020

Code answers related to "TypeScript"

Browse Popular Code Answers by Language