You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

65 lines
1.5 KiB

<?php
namespace App\Console\Commands;
use App\Services\XiaoyuService;
use App\Services\XiurenjiService;
use App\Services\YouwuService;
use Illuminate\Console\Command;
class XiurenjiScrape extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'xiuren:s {all} {site} {num} {start}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Command description';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
//
$isAll = $this->argument('all');
$site = $this->argument("site");
$num = $this->argument("num");
$start = $this->argument("start");
// if ($site == "xiuren") {
$service = new XiurenjiService();
// } else if ($site == "xiaoyu") {
// $service = new XiaoyuService();
// } else if ($site == "youwu"){
// $service = new YouwuService();
// }
// if ($isAll == "1") {
// $service->scrapeAll();
// } else {
// $service->scrapeAlbum($site, $num, $start);
// }
$service->scrapeSingleAlbum("https://www.xiurenb.cc/XiuRen/1.html");exit;
}
}