Currently using the below to scrape a local web page for flood information but because the top two rows have gone to 'danger' the class has slightly changed. It's not "row border py-2 bg-success" anymore it's "row border py-2 bg-danger" and there's probably a "row border py-2 bg-warning" as well to take into account as an edge case. How can I please look for "^row border py-2 bg-"? I was hoping ^ would work as begins with but it doesn't seem to! Thanks
import requests
from bs4 import BeautifulSoup
url = "http://nosearmy.com/isitflooded/"
r = requests.get(url)
soup = BeautifulSoup(r.content, "lxml")
g_data = soup.find_all("div", {"class": "row border py-2 bg-success"})
print g_data[0].text
print g_data[1].text
print g_data[2].text
print g_data[3].text
print g_data[4].text
print g_data[5].text