How can I get the time data behind two \"divs\" with BeautifulSoup?
6:00.00
I\'ve tried the f
Try this to get the time you wish to scrape:
import requests
from bs4 import BeautifulSoup
page = requests.get("https://www.energystorageexchange.org/projects/2")
soup = BeautifulSoup(page.content, 'lxml')
for item in soup.select("label.new_font"):
if "HH:MM" in item.text:
itemval = item.find_parent().find_next_sibling().text.strip()
print(itemval)
Output:
6:00.00