📜  如何将响应转换为 beautifulsoup 对象 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:21.421000             🧑  作者: Mango

代码示例1
import requests
from bs4 import BeautifulSoup

url = 'https://www.google.com'

response = requests.get(url)

html_file = BeautifulSoup(response.text, "html.parser")

print(html_file.prettify())