[Python] Is there a way to parse out HTML in a response from requests.get()?

Discussão em 'Python' iniciado por Stack, Junho 26, 2025.

  1. Stack

    Stack Membro Participativo

    I'm using the requests package to get data from an API and see some HTML elements in the response data such as <p>, </p>, and \', among a bunch of other elements. The return value for response.encoding is utf-8 if that helps.

    I'd like to parse out all the HTML values and just have a simple text value in the field. Is there a way to easily remove or parse all HTML elements in the response?

    Continue reading...

Compartilhe esta Página