Answers for "beautifulsoup get h1"

1

get all h1 beautifulsoup

# to get all h1 from the page 
soup = BeautifulSoup('html_file', 'html.parser')
all_h1 = soup.find_all('h1')
Posted by: Guest on February-27-2021
0

beautifulsoup get h1

company = soup.find('h1', {'class' : 'listing-name'})
Posted by: Guest on November-15-2020

Python Answers by Framework

Browse Popular Code Answers by Language