# Get the webpage
_____________________________________________
# Extract info from the page
_____________________________________________
# Do something with the info
_____________________________________________
# Load libraries for web scraping
from bs4 import BeautifulSoup
import requests
# Get a soup from a URL
url = _________________________
r = requests.get(url)
soup = BeautifulSoup(r.content, 'html.parser')
# Load libraries for web scraping
from bs4 import BeautifulSoup
import requests
# Get a soup from multiple URLs
base_url = ___________________________________
endings = ___________________________________
for ending in endings:
url = base_url + ending
r = requests.get(url)
soup = BeautifulSoup(r.content, 'html.parser')
# Get all tags of a certain type from the soup
tags = soup.find_all(___________)
# Collect info from the tags
collect_info = []
for tag in tags:
# Get info from tag
info = tag.________
collect_info.append(info)
# Get first tag of a certain type from the soup
first_tag = soup.find(___________)
# Get all tags of a certain type from the first tag
tags = first_tag.find_all(____________)
# Collect info from the tags
collect_info = []
for tag in tags:
# Get info from tag
info = tag.________
collect_info.append(info)