spatie / crawler

An easy to use, powerful crawler implemented in PHP. Can execute Javascript.
https://freek.dev/308-building-a-crawler-in-php
MIT License
2.51k stars 357 forks source link

Add request factory #462

Closed asbiin closed 2 months ago

asbiin commented 6 months ago

This adds the ability to define a request factory to create a Guzzle request

Redominus commented 6 months ago

Hi @asbiin and thank you for your contribution. the test shows a behavior that could be already achieved by creating the crawler like this

Crawler::create([
   RequestOptions::HEADERS => [ 
         'X-Foo' => 'Bar'.
   ],
]);

Maybe a bit more code inside the factory would show the true potential of the feature

spatie-bot commented 2 months ago

Dear contributor,

because this pull request seems to be inactive for quite some time now, I've automatically closed it. If you feel this pull request deserves some attention from my human colleagues feel free to reopen it.