我想使用 beautifulSoup从此链接中获取学校名称“Perkins College ...”。
我使用的代码什么也不返回。
school = soup.find('a','profiles-show-school-name-sm-link')
print 'school: ', school
print 'school.text: ', school.text
输出:
school: <a class="profiles-show-school-name-sm-link" href="/profiles/show/online-degrees/stephen-f-austin-state-university/perkins-college-of-education-undergraduate/395/5401">
<img border="0" src="/images/profiles/243x60/4613/degrees/undergraduate-certificate-in-hospitality-administration.png"/>
</a>
school.text:
对 BeautifulSoup 实施以提取学校名称(不是 URL)的建议?谢谢!