1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] Accessing aria-hidden elements with Scrapy-Playwright

Discussão em 'Python' iniciado por Stack, Setembro 11, 2025.

  1. Stack

    Stack Membro Participativo

    I'm using scrapy to access a response element. Since this element is hidden, it returns an empty object. How can I make this object visible?

    This is the div class I like to access or click on it.

    <div class="listing-content-provider-i0v7mt" data-genesis-element="CARD_HEADER_CONTAINER" aria-expanded="false" aria-controls="stepstone-disclosure-6147" tabindex="0">...</div>


    It is also possible to click on this element. However, this also seems not to work.

    The code for making the div class visible.

    async def parse_jobs(self, response):
    meta=dict(
    playwright=True,
    playwright_include_page = True,
    playwright_page_methods = [
    #Waiting for the class
    PageMethod('wait_for_selector', 'div.listing-content-provider-i0v7mt','aria-expanded="true"'),
    # or
    PageMethod('click', 'div.listing-content-provider-i0v7mt'),
    ]
    )

    Continue reading...

Compartilhe esta Página