python bs4的select怎么让输出结果不包含标签
发布网友
发布时间:2022-05-25 12:22
我来回答
共1个回答
热心网友
时间:2023-10-27 12:03
#!/usr/bin/env python
# -*- coding:utf-8 -*-
from bs4 import BeautifulSoup
html = "<title>The Dormouse's story</title>"
soup = BeautifulSoup(html, "html.parser")
print soup.select('title')[0].text