I am trying to scrape data from a utility website using python, beautiful soup and selenium. The data that I am trying to scrape is stuff like: time, cause, status, etc. When I run a typical page request, parse the page, and parse the data that I am looking for (data in id="OutageListTable"), and print it, the divs and strings are nowhere to be found. When I inspect the page element, the data is there, but it is in a flex container.
This is the code that I am using:
from urllib.request import urlopen as uReq
from bs4 import BeautifulSoup as soup
import urllib3
from selenium import webdriver
my_url = 'https://www.pse.com/outage/outage-map'
browser = webdriver.Firefox()
browser.get(my_url)
html = browser.page_source
page_soup = soup(html, features='lxml')
outage_list = page_soup.find(id='OutageListTable')
print(outage_list)
browser.quit()
How do you retrieve information that is in a flex/flexbox container? I am not finding any resources online to help me figure it out.