import requests
from bs4 import BeautifulSoup
import re
with open('d:/3.Test.html','r',encoding='utf8') as s:
soup=BeautifulSoup(s,'lxml')
print(soup)
news_div=soup.find('tbody')
title_list=news_div.find_all('tr')[0].text
a=[]
for row in soup.table.find_all('td')[1:]:
print(row.text)
部分输出如下,下为两组数据,需按要求放入字典: