roach-php / core

The complete web scraping toolkit for PHP.
https://roach-php.dev
1.35k stars 67 forks source link

When two crawlers need to share the same login operation #247

Open ZhangChengLin opened 4 months ago

ZhangChengLin commented 4 months ago

There are two separate crawlers that need to share the same login operation. Should this login step be made into a middleware or a processor? It is now a php trait.

Or make an Extensions

ZhangChengLin commented 4 months ago

Looks like the answer is already there.

Want to add custom HTTP headers to every outgoing request based on some condition? Sure thing, sounds like a job for a downloader middleware.

https://roach-php.dev/docs/introduction#built-with-extensibility-in-mind