I think this gets me the length of the text count for "COVID-19" because it prints 8.
from bs4 import BeautifulSoup
url = r'https://www.bolingbrook.com/coronavirus'
soup = BeautifulSoup(requests.get(url.content, "lxml")
#find occurences of string
When I do a CTRL+F for "COVID-19" on the webpage I get a count of 5 occurrences. When I do a CTRL+F for "COVID-19" in the Developer tools I get 15.
I'm trying to get the count for the total occurrences of the string "COVID-19". How can I set up the code to do that?