roach-php / core

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

Parameter type requirements #251

Open ZhangChengLin opened 3 months ago

ZhangChengLin commented 3 months ago

https://github.com/roach-php/core/blob/450ed504c556b2243ea7cc76f44161242a551a5a/src/Spider/BasicSpider.php#L62

The $requestDelay attribute is expected to support expressions, and the target needs to be a specified range of random values ​​(including non-integer numbers).


https://github.com/roach-php/core/blob/653347a121d22438f23f38081a26208ca9389a10/src/Scheduling/RequestSchedulerInterface.php#L40

The parameter type of setDelay is expected to support non-integer formats.

ZhangChengLin commented 3 months ago

By the way, why is the default concurrency here so high?

https://github.com/roach-php/core/blob/653347a121d22438f23f38081a26208ca9389a10/src/Core/Run.php#L41