Skip to content
This repository was archived by the owner on Apr 1, 2023. It is now read-only.
This repository was archived by the owner on Apr 1, 2023. It is now read-only.

Goutte can't find elements that are out of view or still haven't loaded #423

@matveynikon

Description

@matveynikon

I am trying to make a simple youtube seo tool with goutte. It is supposed to search for a keyword, find a certain video and print the position at which the video is at for that keyword. My problem is that my goutte bot can't find videos that are under the top 10 results. I suppose that is either because those videos haven't loaded yet because for those videos to load a person has to actually scroll down(which I am unable to do with goutte) or because the video is simply out of view port.

Does anyone know a solution? Or If anyone knows if there is a way to scroll in goute, please tell me.

My code:

request('GET', 'https://www.youtube.com/results?search_query=php+web+scraping'); sleep(5); $crawler->selectLink('php web scraping tutorial(simple)')->link();//this video is in the top 30 ?>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions