import requests
from bs4 import BeautifulSoup
url = 'http://www.xbiquge.la/1/1988/'
a = requests.get(url)
a.encoding = 'utf-8'
b = BeautifulSoup(a.text, 'lxml')
c = b.select('#info > h1')
d=c.get_text()
print(c)
请问这样为什么不能去掉html标签?
import requests
from bs4 import BeautifulSoup
url = 'http://www.xbiquge.la/1/1988/'
a = requests.get(url)
a.encoding = 'utf-8'
b = BeautifulSoup(a.text, 'lxml')
c = b.select('#info > h1')
d=c.get_text()
print(c)
请问这样为什么不能去掉html标签?
biaoti = soup.find(class_="weizhi").find("h1").text
我没用过select,我都是用find