IYUUPlus/bin/spiders.php
2022-10-03 11:03:11 +08:00

28 lines
731 B
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
require_once ROOT_PATH . '/app/functions.php';
require_once ROOT_PATH . '/src/helper.php';
echo microtime(true) . ' 当前脚本路径:' . __FILE__ . PHP_EOL;
use IYUU\Spiders\SitesBase;
use Workerman\Autoloader;
Autoloader::setRootPath(ROOT_PATH);
global $argv;
echo "免费种爬虫,目前支持以下站点:" . PHP_EOL;
ShowTableSites('Spiders');
if (count($argv) < 2) {
echo "执行免费种爬虫命令时,缺少参数!!" . PHP_EOL;
exit(1);
}
// php脚本文件
$start_file = $argv[0];
// 参数1任务标志
$uuid = trim($argv[1]);
// 通用部分
$className = SitesBase::getSpidersClass($uuid);
$className::init();
$className::run();