bs4 get second element code example Example: get only parent child elements beautiful soup >>> soup.select('li.test > a') [<a>link1</a>, <a>link3</a>]