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
In case there is more than one span tag in the page:
from bs4 import BeautifulSoup soup = BeautifulSoup(your_html_input, 'html.parser') span = soup.find("span", id="count_text") span.text