I have to run my five different scrapy spiders at the same time so I define a custom command in scrapy like
scrapy crawlall
to call these spiders. It works successfully when I run in command line in independent.
However it fails when I use php shell_exec to call the same command and the code in php file is like
$cmd = 'scrapy crawlall';
$results = shell_exec($cmd);
echo $results;
The web page will echo nothing immediately and not waiting the scrapy function(or even it wasn't be called at the beginning I don't know). So how can I call this command or other way to run these 5 spiders at the same time in php file? Thanks!
[scrapy.extensions.telnet] DEBUG: Telnet console listening on 127.0.0.1:6023Does anyone know what's going on?scrapy listfrom PHP and see if it returns the expected spiders?