You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello !
I want to crawl list pages handled by a JS pager.
Is there a way with Roach PHP to simulate the click to a given page and crawl the received html code?
But obviously, I get an error RoachPHP\Http\Request::__construct(): Argument #2 ($uri) must be of type string, Spatie\Browsershot\Browsershot given
As Roach needs a string and Browsershot is giving me a Browsershot object.
Would someone be kind to provide a working example?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello !
I want to crawl list pages handled by a JS pager.
Is there a way with Roach PHP to simulate the click to a given page and crawl the received html code?
I’ve read the doc https://roach-php.dev/docs/downloader-middleware/#executing-javascript and installed the required libraries but I don’t understand how to make things work.
I’ve tried something like this in initialRequests():
But obviously, I get an error
RoachPHP\Http\Request::__construct(): Argument #2 ($uri) must be of type string, Spatie\Browsershot\Browsershot given
As Roach needs a string and Browsershot is giving me a Browsershot object.
Would someone be kind to provide a working example?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions