BeautifulSoup provides the soup::get_text()
method for extracting text from a parsed HTML document (somewhat confusingly, this is equivalent to the getText
method and the text
property). You can access the parsed HTML of the current page using browser.parsed
. So, to get the plain text of the current page, try
text = browser.parsed.get_text()