Beautiful Soup

#pip install bs4
from bs4 import BeautifulSoup
import requests


html = requests.get('https://www.python.org')

soup = BeautifulSoup(html.text, 'lxml')

titles = soup.find_all('title')
print(titles[0].text)

intro = soup.find_all('div', {'class': 'introduction'})
print(intro[0].text)
Welcome to Python.org

Python is a programming language that lets you work quickly and integrate systems more effectively. Learn More

Recommended Posts

Beautiful Soup
Beautiful Soup memo
Beautiful soup spills
My Beautiful Soup (Python)
Scraping with Beautiful Soup
Table scraping with Beautiful Soup
Crawl practice with Beautiful Soup
Try scraping with Python + Beautiful Soup
A memorandum when using beautiful soup
Scraping multiple pages with Beautiful Soup
[Python] A memorandum of beautiful soup4
Scraping with Python and Beautiful Soup
Scraping pages with pagination with Beautiful Soup
Scraping with Beautiful Soup in 10 minutes
Website scraping with Python's Beautiful Soup
[Python3] Understand the basics of Beautiful Soup
[Python] Scraping a table using Beautiful Soup
Remove unwanted HTML tags with Beautiful Soup
Frequently used methods of Selenium and Beautiful Soup
How to search HTML data using Beautiful Soup
I get an Import Error in Python Beautiful Soup
Note that I dealt with HTML in Beautiful Soup
[Python] Delete by specifying a tag with Beautiful Soup
Automated testing method combining Beautiful Soup and Selenium (Python)
Delete / replace specific elements of HTML source [Beautiful Soup]