Z kodu poniżejCzy istnieje odpowiednik InnerText w BeautifulSoup/python?
soup = BeautifulSoup(page.read(), fromEncoding="utf-8")
result = soup.find('div', {'class' :'flagPageTitle'})
mam następujący kod HTML:
<div id="ctl00_ContentPlaceHolder1_Item65404" class="flagPageTitle" style=" ">
<span></span><p>Some text here</p>
</div>
Jak mogę uzyskać Some text here
bez tagów? Czy istnieje odpowiednik InnerText w BeautifulSoup/python?
Dzięki. Właściwie szukałem sposobu, aby to zrobić bez dodatkowego "find". W twoim scenariuszu mogę również użyć 'result.find ('p'). Contents [0]'. –