from bs4 import BeautifulSoup
import requests
if name==“main”:
target=“https://mbd.baidu.com/newspage/data/landingsuper?context=%7B%22nid%22%3A%22news_9433710732874198416%22%7D&n_type=0&p_from=1”
bf=BeautifulSoup(requests.get(target).text)
textes=bf.find_all(‘span’,class_=“bjh-p”)
print(textes[0].text.replace('\xa0' * 8, '\n\n'))
print(textes[1].text.replace('\xa0' * 8, '\n\n'))
print(textes[2].text.replace('\xa0' * 8, '\n\n'))