Advanced Python: Web Scraping

Goal

Step 1: Using BeautifulSoup


import requests
from bs4 import BeautifulSoup

url = "https://example.com"
page = requests.get(url)

soup = BeautifulSoup(page.text, "html.parser")

print(soup.title.text)

Explanation:

Task