roach-php / core

The complete web scraping toolkit for PHP.

Home Page:https://roach-php.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Overriding Not Working

sinarahmany opened this issue · comments

Hi, hope all is well,
Im trying to pass the URL dynamically using overriding but its not working and the response is null.
Thank you

Roach::startSpider(
            LoremIpsumSpider::class,
            new Overrides(startUrls: ['https://sinarahmannejad.com']),
        );

        $result = Roach::collectSpider(LoremIpsumSpider::class);

same problem here

my bad it works fine, but dont forget to also provide Overrides in your Roach::collectSpider call

Just to be clear, you're supposed to either call startSpider or collectSpider.https://roach-php.dev/docs/spiders/#retrieving-scraped-items-after-a-run