This commit is contained in:
salam committed 2026-09-26 17:49:06 +02:00
1 parent 267b5b9583
commit 911b515021
15 files changed
+1048 -56

No files matched your search

+57 -25
View File
@@ -5,7 +5,6 @@ namespace App\Console\Commands;
use App\Console\Commands\Grapper\Sofascore\Grapper;
use App\Console\Commands\Grapper\Sofascore\GrapperTest;
use App\Console\Commands\Grapper\Sofascore\Helper\ClearDir;
use App\Console\Commands\Grapper\Sofascore\Helper\RemoveDir;
use App\Console\Commands\Grapper\Sofascore\Helper\SetStorage;
use App\Console\Commands\Grapper\Sofascore\MakeExcel;
use App\Console\Commands\Grapper\Sofascore\Rose;
@@ -29,7 +28,7 @@ class Grap extends Command
public static string $useragent = '4';
protected $signature = 'grp {id=0} {day=0} {--date=} {--folder=} {--d} {--g} {--r} {--c} {--m} {--f} {--F} {--R} {--S}';
protected $signature = 'grp {id=0} {mode} {day=0} {--date=} {--folder=} {--d} {--g} {--r} {--c} {--m} {--f} {--F} {--R} {--S}';
public function handle()
{
@@ -39,38 +38,71 @@ class Grap extends Command
self::$options['base_url'] = 'https://www.sofascore.com/';
if (! self::$options['id']) {
$txt = 'PARAMETERS' . PHP_EOL;
$txt .= '--d debug' . PHP_EOL;
$txt .= '--r restart range' . PHP_EOL;
$txt .= '--f force Events' . PHP_EOL;
$txt .= '--F force DayTournament links' . PHP_EOL;
$txt .= '--c clear grap dir' . PHP_EOL;
$txt .= '--m mail only' . PHP_EOL;
$txt .= '--C clear folder' . PHP_EOL;
$txt .= '--G grap' . PHP_EOL;
$txt .= '--E make excel' . PHP_EOL;
$txt .= '--M mail' . PHP_EOL;
$txt .= '--folder' . PHP_EOL;
$txt .= '-----------------------------------------------------------' . PHP_EOL;
$txt .= 'FUNCTION' . PHP_EOL;
$txt .= ' 1 grapper DAILY & subDays ( default 3)' . PHP_EOL;
$txt .= ' 2 grapper MORE DAYS' . PHP_EOL;
$txt .= ' 3 grapper RANGE' . PHP_EOL;
$txt .= ' 4 grapper ROSE' . PHP_EOL;
$txt .= ' 5 import to excel from folder' . PHP_EOL;
$txt .= ' 7 settings to local' . PHP_EOL;
$txt .= ' 11 move SQL' . PHP_EOL;
$txt .= ' 12 testing url for grapping' . PHP_EOL;
$txt = 'PARAMETERS'.PHP_EOL;
$txt .= '--d debug'.PHP_EOL;
$txt .= '--r restart range'.PHP_EOL;
$txt .= '--f force Events'.PHP_EOL;
$txt .= '--F force DayTournament links'.PHP_EOL;
$txt .= '--c clear grap dir'.PHP_EOL;
$txt .= '--m mail only'.PHP_EOL;
$txt .= '--C clear folder'.PHP_EOL;
$txt .= '--G grap'.PHP_EOL;
$txt .= '--E make excel'.PHP_EOL;
$txt .= '--M mail'.PHP_EOL;
$txt .= '--folder'.PHP_EOL;
$txt .= '-----------------------------------------------------------'.PHP_EOL;
$txt .= 'FUNCTION'.PHP_EOL;
$txt .= ' 1 grapper DAILY & subDays ( default 3)'.PHP_EOL;
$txt .= ' 2 grapper MORE DAYS'.PHP_EOL;
$txt .= ' 3 grapper RANGE'.PHP_EOL;
$txt .= ' 4 grapper ROSE'.PHP_EOL;
$txt .= ' 5 import to excel from folder'.PHP_EOL;
$txt .= ' 7 settings to local'.PHP_EOL;
$txt .= ' 11 move SQL'.PHP_EOL;
$txt .= ' 12 testing url for grapping'.PHP_EOL;
Notice::note($txt, 'b', 1);
}
Notice::note('Task Id ' . self::$options['id'], 'gb');
Notice::note('Task Id '.self::$options['id'], 'gb');
if (self::$options['cear']) {
SetStorage::set(1);
ClearDir::clear();
}
if (self::$options['grap']) {
SetStorage::set(1);
Grapper::load(1);
}
if (self::$options['excel']) {
SetStorage::set(1);
MakeExcel::create();
}
if (self::$options['mail']) {
SetStorage::set(1);
SendMail::run(1);
}
case 4:
// ROSE
SetStorage::set(4);
Rose::run();
MakeExcel::create();
break;
switch (self::$options['id']) {
case 1:
// DAILY
if (self::$options['c']) {
SetStorage::set(1);
ClearDir::clear();
}
if (self::$options['C']) {
Grapper::load(1);
}