Reputation: 21
I want to recover only the "A côté" in:
<a href="https://www.synonymeur.com/synonyme/a-cote/" title="Synonyme du mot À côté">À côté</a>
In python with beautifulsoup and requests.
Upvotes: 0
Views: 47
Reputation: 598
To find all tag texts use following,
links = soup.find_all('a')
links_texts = [x.text for x in links]
In order to select certain tags use the "attrs" parameter in the soup.find_all function.
Upvotes: 1