My code is working. But the only thing it's also returning the HTML tags. Is there anything I can add to my FOR loop to strip the HTML code?
Here's my code below.
addressNeeded = soup.find("h1", {"style": "font-size: inherit; font-weight: inherit;"})
for x in addressNeeded:
addressList.append(x)
the outcome is:
['\n', <label class="summary-list__label">
<span itemprop="streetAddress">95 Cooks Drive</span>
</label>, '\n', <span class="summary-list__label summary-list__label--small">
<span itemprop="addressLocality">Westside</span>,
<span itemprop="addressRegion">NY</span>
<span itemprop="postalCode">07663</span>
I thank you in advance!