[Python] How do I read the content of a span class with python playwright

Discussão em 'Python' iniciado por Stack, Agosto 21, 2025.

  1. Stack

    Stack Membro Participativo

    I want to read the score from a webpage. The score is located in:

    <span _ngcontent-fnp-c148="" class="score"> &nbsp;<!--bindings={
    "ng-reflect-ng-if": "false"
    }--> 96%, </span>


    Here the result would be "96%"

    I'd like to either search for the classname "score" directly, or if it's necessary dump the entire page html into a string and search for it manually. An approach to do either would be fine.

    I'm using python playwright, but I assume the methods should be similar to the original.

    Continue reading...

Compartilhe esta Página