I have a number of facebook groups that I would like to get the count of the members of. An example would be this group: https://www.facebook.com/groups/347805588637627/ I have
You can use the text attribute of the parsed span:
text
>>> from bs4 import BeautifulSoup >>> soup = BeautifulSoup('9,413 members', 'html.parser') >>> soup.span 9,413 members >>> soup.span.text '9,413 members'