beautifulsoup findall code example
Example 1: beautifulsoup find all class
mydivs = soup.findAll("div", {"class": "stylelistrow"})
Example 2: use beautifulsoup
#start
from bs4 import BeautifulSoup
import requests
req = requests.get('https://www.slickcharts.com/sp500')
soup = BeautifulSoup(req.text, 'html.parser')
Example 3: python beautifulsoup find_all
import re
soup.find_all(re.compile("^b")):
soup.find_all('b')
soup.find_all(["a", "b"])