<?php
|
|
|
|
namespace App\Console\Commands;
|
|
|
|
use App\Services\AcfunService;
|
|
use Illuminate\Console\Command;
|
|
|
|
class AcfunScrape extends Command
|
|
{
|
|
/**
|
|
* The name and signature of the console command.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $signature = 'acfun:scrape';
|
|
|
|
/**
|
|
* 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()
|
|
{
|
|
// 几兔灰 10703951
|
|
// 香菜猫饼 4537972
|
|
// 小清晨儿 2277346
|
|
// kyokyo 13215999
|
|
// 苏子怡 13651121
|
|
$service = new AcfunService();
|
|
$upItems = [
|
|
10703951 => "几兔灰",
|
|
4537972 => "香菜猫饼",
|
|
2277346 => "小清晨儿",
|
|
13215999 => "kyokyo",
|
|
13651121 => "苏子怡",
|
|
3540234 => "雾奈奈-",
|
|
826046 => "Sakuya十六",
|
|
16146427 => "椰汁兔",
|
|
36414290 => "你的清清呀"
|
|
];
|
|
$service = new AcfunService();
|
|
// 不用了 $service->requestUpPageApi(10703951);exit;
|
|
foreach ($upItems as $upId => $upName) {
|
|
$service->queryUpUsersVideos($upId, $upName);
|
|
echo "$upId, $upName \n";
|
|
}
|
|
// dump("here");
|
|
$service->queryCollectionVideos();
|
|
$service->downloadVideo();
|
|
//
|
|
}
|
|
}
|