BeautifulSoup Soup findall 仅提取 class 数据
BeautifulSoup Soup findall extract only the class data
我只想提取 < > 标签之间 class 行中的数据,html 行是:
[<h4 class="jobsearch-CompanyReview--heading">ABC</h4>]
我正在使用这段代码,但它返回了竞争行,我只想要字符串的 ABC 部分。
company = soup.find_all("h4", class_ ="jobsearch-CompanyReview--heading")
我怎样才能从 html 字符串中删除数据?
company = soup.find_all("h4", class_ ="jobsearch-CompanyReview--heading")[0].text
我只想提取 < > 标签之间 class 行中的数据,html 行是:
[<h4 class="jobsearch-CompanyReview--heading">ABC</h4>]
我正在使用这段代码,但它返回了竞争行,我只想要字符串的 ABC 部分。
company = soup.find_all("h4", class_ ="jobsearch-CompanyReview--heading")
我怎样才能从 html 字符串中删除数据?
company = soup.find_all("h4", class_ ="jobsearch-CompanyReview--heading")[0].text