【发布时间】:2021-12-18 02:00:28
【问题描述】:
我正在尝试提取特定的 HTML 标记并翻译其中的文本值并用翻译后的值替换文本。我正在使用python和bs4。我一直在考虑字符串替换,但我不知道如何将 BeautifulSoup 作为字符串处理。 这是我提取的html代码
<p style="text-align: center;">Everyone Active has opened its own online shop that’s packed with fantastic quality fitness equipment that’s perfect for helping you work out at home at incredible prices. Follow the link below to find out more.</p>
我希望最终结果是:
<p style="text-align: center;">Everyone Active ha abierto su propia tienda en línea que está repleta de equipos de fitness de calidad fantástica que son perfectos para ayudarte a hacer ejercicio en casa a precios increíbles. Sigue el enlace de abajo para descubrir mas.</p>
【问题讨论】:
标签: python web-scraping beautifulsoup python-requests web-crawler