I want to search the html divs starting with different ids but the same classes:
<div id="alabama" class="sc-fzoxKX fmCwKG state-entry">
<div id="alaska" class="sc-fzoxKX fmCwKG state-entry">
I tried to use
containers = page_soup.findAll("div", {"class":"sc-fzoxKX fmCwKG state-entry"})
But when I tested by writing len(containers)
, it returns 0.
I also tried containers[0]
, but it returns an index out of range error.
Could anyone offer me some insight on how I can search through the list?