提取html中的text文本

from bs4 import BeautifulSoup

def get_text(html):
    soup = BeautifulSoup(html)
    return soup.get_text()

df['aaa'] = df['aaa'].apply(get_text)

你可能感兴趣的:(提取html中的text文本)