contents是一个数组
contents[0].text即可获取
下面的代码你可以运行看下效果
print(titles[0].text)
for title in titles:
print(title.text)
for content in contents:
print(content.text)
contents是一个数组
contents[0].text即可获取
下面的代码你可以运行看下效果
print(titles[0].text)
for title in titles:
print(title.text)
for content in contents:
print(content.text)