wip
This commit is contained in:
1 parent
4887c72e89
commit
cacc5b4047
5 files changed
+27
-9
No files matched your search
@@ -28,7 +28,7 @@ class Grap extends Command
|
||||
|
||||
public static string $useragent = '4';
|
||||
|
||||
protected $signature = 'grp {id=0} {day=0} {--folder=} {--d} {--r} {--f} {--R} {--S}';
|
||||
protected $signature = 'grp {id=0} {day=0} {--date=} {--folder=} {--d} {--r} {--f} {--R} {--S}';
|
||||
|
||||
public function handle()
|
||||
{
|
||||
@@ -78,9 +78,9 @@ class Grap extends Command
|
||||
break;
|
||||
case 2:
|
||||
// DATE
|
||||
// SetStorage::set();
|
||||
SetStorage::set(2);
|
||||
|
||||
// Grapper::load(2);
|
||||
Grapper::load(2);
|
||||
break;
|
||||
case 3:
|
||||
// RANGE
|
||||
|
||||
@@ -14,6 +14,7 @@ class LoadDays
|
||||
{
|
||||
$debug = Grap::$options['d'] ?? 0;
|
||||
$restart = Grap::$options['r'] ?? 0;
|
||||
$date = Grap::$options['date'] ?? '';
|
||||
|
||||
$dates = [];
|
||||
|
||||
@@ -36,7 +37,7 @@ class LoadDays
|
||||
break;
|
||||
|
||||
case 'date':
|
||||
$dates[] = ValidateDate::get($task->day_from);
|
||||
$dates[] = ValidateDate::get($date);
|
||||
break;
|
||||
|
||||
case 'range':
|
||||
|
||||
@@ -17,6 +17,8 @@ class SetStorage
|
||||
|
||||
$folder = Grap::$options['folder'] ?? '';
|
||||
|
||||
$date = Grap::$options['date'] ?? '';
|
||||
|
||||
$day = Grap::$options['day'] == 0 ? 2 : Grap::$options['day'];
|
||||
|
||||
// must be connectet to task for activated ligas
|
||||
@@ -33,8 +35,9 @@ class SetStorage
|
||||
Grap::$excel = Grap::$storage . '/' . Grap::$folder;
|
||||
break;
|
||||
case 2:
|
||||
Grap::$storage = $sofascore_data . $storage_name . '/' . $task->day_from;
|
||||
Grap::$zipfile = $sofascore_data . $storage_name . '/' . $task->day_from . '.zip';
|
||||
Grap::$storage = $sofascore_data . $storage_name;
|
||||
Grap::$folder = $date;
|
||||
Grap::$excel = $sofascore_data . $storage_name . '/' . $date;
|
||||
break;
|
||||
case 3:
|
||||
Grap::$storage = $sofascore_data . 'range/' . $storage_name;
|
||||
@@ -47,8 +50,9 @@ class SetStorage
|
||||
Grap::$excel = Grap::$storage . '/rosa-' . Carbon::now()->format('Y-m-d');
|
||||
break;
|
||||
case 5:
|
||||
Grap::$storage = $sofascore_data;
|
||||
Grap::$storage = $sofascore_data . 'excel';
|
||||
Grap::$folder = $folder;
|
||||
Grap::$excel = $sofascore_data . 'excel/' . $storage_name;
|
||||
break;
|
||||
}
|
||||
} elseif ($folder) {
|
||||
@@ -57,8 +61,7 @@ class SetStorage
|
||||
}
|
||||
|
||||
if ($debug) {
|
||||
Notice::note(Grap::$folder, 'g');
|
||||
// Notice::note(Grap::$storage);
|
||||
Notice::note(Grap::$storage, 'g');
|
||||
if (!$force) {
|
||||
sleep(4);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user