html = """<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>科创板落地时间轴预测</title>
<link rel="stylesheet" href="https://stackedit.io/style.css" />
</head>
<body class="stackedit">
<div class="stackedit__html"><h2><a id="_0"></a><strong>科创板落地时间轴预测
</strong></h2>
<p><strong>2019年3月2日</strong></p>
<blockquote>
<p>中国证监会正式发布《科创板首次公开发行股票注册管理办(试行)》和《科创板上市公司持续监管
办法(试行)》,自公布之日起实施。经证监会批准,上交所、中国结算相关业务规则随之发布</p>
</blockquote>
<p><strong>2019年3月18日</strong></p>
<blockquote>
<p>上市审核系统正式对外受理科创板项目申报</p>
</blockquote>
<p><strong>2019年6月中旬(预计最快时间)</strong></p>
<blockquote>
<p>第一批申报科创板的企业通过审核,科创板开板<br>
预期2019全年的科创板上市企业或在150家左右,预估募资规模500-1000亿元</p>
</blockquote>
<p><strong>2020年</strong></p>
<blockquote>
<p>2020年阶段性成熟成果可期<br>
未来科创板有望吸引体量更大的海外中概股或独角兽企业上市</p>
</blockquote>
</div>
</body>
</html>
"""
from bs4 import BeautifulSoup
# 2.读取HTML字符串
soup = BeautifulSoup(html, 'html.parser')
a = soup.body.descendants
# print(list(a))
res = ''
for i in a:
if str(i).strip():
print('+++', i)
res = i
break
print('\n\n\n')
print('++', res, '++')
bs4获取html中body中的所有子标签
最新推荐文章于 2024-07-17 14:11:27 发布