I am using BeautifulSoup to extract some anchor tags from a page.
soup = BeautifulSoup(html)
for tag in soup.find_all('a'):
print (tag.text)
But I don’t know how many anchor tags I have got. I want to have a count of it.
I tried doing this
print (count(tag.text))
But it didn’t work. Any idea how to do it?