pip show beautifulsoup4
pip install beautifulsoup4
import requests
from bs4 import BeautifulSoup
url='http://jd.com'
r=requests.get(url)
r.text
print(r.text)
soup=BeautifulSoup(r.text,'html.parser')#python标准库里的解析或者lxml解析器
print(soup.prettify())#让soup输出的内容以树形结构自动分行