'''
beautifulsoup4
'''
from urllib import request
from bs4 import BeautifulSoup

url = "http://www.baidu.com"
rsp = request.urlopen(url)
content = rsp.read()

# 创建bs实例
soup = BeautifulSoup(content, "lxml")

# bs自动转码
content = soup.prettify()
print(content)

a99b8906789056a2b6b338b23caa4f968b13e438
<mask token>

<mask token>
print(content)

<mask token>
url = 'http://www.baidu.com'
rsp = request.urlopen(url)
content = rsp.read()
soup = BeautifulSoup(content, 'lxml')
content = soup.prettify()
print(content)

<mask token>
from urllib import request
from bs4 import BeautifulSoup
url = 'http://www.baidu.com'
rsp = request.urlopen(url)
content = rsp.read()
soup = BeautifulSoup(content, 'lxml')
content = soup.prettify()
print(content)

'''
beautifulsoup4
'''
from urllib import request
from bs4 import BeautifulSoup

url = "http://www.baidu.com"
rsp = request.urlopen(url)
content = rsp.read()

# 创建bs实例
soup = BeautifulSoup(content, "lxml")

# bs自动转码
content = soup.prettify()
print(content)
