How to run python scrapy from php

How to run python scrapy from php
0.0 0

#1

I have python scrapy for crawling data from the web site.
BTW, I should run the spiders from the php.
I tried to run the spiders with php, but I can’t run that.
I use virtual environment.

This is my php script:

$command = escapeshellcmd("scrapy crawl spider_name ");
$output = shell_exec($command);

How can I solve this problem?


#2

Could you post any error codes and language versions? This will help localize the issue.


#3

Why do you need to run the spiders from php? Is it possible to just schedule the spiders so that they run periodically?