Goal: what we will make by the end of the day

Parsing HTML and Making Soup

Beautiful Soup Documentation - Beautiful Soup 4.9.0 documentation

from bs4 import BeautifulSoup

with open("website.html") as file:
    contents = file.read()

soup = BeautifulSoup(contents, "html.parser")

Untitled

Untitled

BeautifulSoup中各種html解析器的比較及使用