Beautiful Soup库理解-查看官方文档
<html>
<body>
<p class = "title">...</p>
<body>
<html>
基于bs4库遍历方法
bs4库格式化和编码
from bs4 import BeautifulSoup
soup = BeautifulSoup("<p>data</p>","html.parser")
from bs4 import BeautifulSoup
import requests
r=requests.get("https://python123.io/ws/demo.html")
demo = r.text
soup = BeautifuSoup(demo,"parser")
soup.prettifuy()
print(soup.prettify())
#标签做换行处理