I am trying to parse a website in order to pull out some data that is stored in the body, for example:
<body> <b>INFORMATION</b> Hookups: None Group Sites: No Station: No <b>Details</b> Ramp: Yes </body>
I would like to use BeautifulSoup4 and RegEx to pull the values ββfor Hookups and Group Sites and so on, but I'm new to both bs4 and RegEx. I tried the following to get the value of Hookups:
soup = BeautifulSoup(open('doc.html')) hookups = soup.find_all(re.compile("Hookups:(.*)Group"))
But the search returns empty.
bcoop713
source share