BeautifulSoup – extracting attribute values

If you already have the anchor, grab the href attribute like this:

href = anchor["href"]

Leave a Comment