what is soup object py? It’s the magic that turns HTML into something you can actually work with in Python. BeautifulSoup creates it, and you use it to find stuff.
Example:
```python
soup = BeautifulSoup(html, 'lxml')
first_h1 = soup.h1 # gets the first h1 tag
```
It’s important because it handles all the ugly HTML parsing for you.
Bonus: Try `soup.get_text()` to extract just the text!
Example:
```python
soup = BeautifulSoup(html, 'lxml')
first_h1 = soup.h1 # gets the first h1 tag
```
It’s important because it handles all the ugly HTML parsing for you.
Bonus: Try `soup.get_text()` to extract just the text!
