... gazpacho: strict


You can grab all the cards from the website with this code.

url = "https://pypi.org/project/pandas/#history"

from gazpacho import get, Soup
html = get(url)
soup = Soup(html)
cards = soup.find("a", {"class": "card"})

If you want to parse these cards it's important to understand the difference between these two queries;

cards[0].find("p", {"class": "release__version"}, strict=True).text
cards[0].find("p", {"class": "release__version"}, strict=False).text

Feedback? See an issue? Something unclear? Feel free to mention it here.

If you want to be kept up to date, consider signing up for the newsletter.