![](http://tiebapic.baidu.com/forum/w%3D580/sign=d7d1ec8fd8510fb37819779fe933c893/2a5dfadcd100baa1fc0de58d0110b912c8fc2e47.jpg?tbpicau=2024-09-18-05_9f300cfbd523a71ec028c520fc699e58)
分数是在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', '')//提取分数
为什么我最后一行提取一直显示我提取到了空的,找不到