I was hoping to create a list of all of the firms featured on this list. I was hoping each winner would be their own section in the HTML but it looks like there are multiple grouped together across several divs. How would you recommend going about solving this? I was able to pull all of the divs but i dont know how to cycle through them appropriately. Thanks!
import requests from bs4 import BeautifulSoup import csv request = requests.get("https://growthcapadvisory.com/growthcaps-top-40-under-40-growth-investors-of-2020/") text = request.text soup = BeautifulSoup(text, 'html.parser') element = soup.find() person = soup.find_all('div', class_="under40") https://stackoverflow.com/questions/65622852/beautiful-soup-nested-loops January 08, 2021 at 11:00AM
没有评论:
发表评论