分数是在div class='bd'里面
dic_list= soup.find_all('div',class_='bd')//
for each in div_list:
chinese_title = each.a.span.text.strip()
en_title = each.a.span.next_sibling.next_sibling.text.strip().replace('\xa0','') # 获取下一个<span>标签的文本作为英文标题
gang_title = each.find('span', class_='other').text.strip().replace('\xa0','')
for each in dic_list:
director = each.p.get_text(strip=True).replace('\xa0', '')
actors = each.find_all('p')[1].get_text(strip=True).replace('\xa0', '')
dive=each.find('div', class_="star")
fen=dive.find('span', class_="rating_num").get_text(strip=True).replace('\xa0', '')//提取分数
为什么我最后一行提取一直显示我提取到了空的,找不到