wip sofascore
This commit is contained in:
1 parent
7aa3c90344
commit
6a9173e3eb
6 files changed
+67
-46
No files matched your search
@@ -51,7 +51,7 @@ class Sofascore
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($debug) {
|
if ($debug) {
|
||||||
Notice::note(Nuh::$options['sport'] . ' ' . Nuh::$options['name'], 'b');
|
Notice::note(Nuh::$options['sport'] . ' ' . Nuh::$options['name'], 'bb');
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (Nuh::$options['name']) {
|
switch (Nuh::$options['name']) {
|
||||||
|
|||||||
@@ -16,7 +16,8 @@ class Events
|
|||||||
public static function load()
|
public static function load()
|
||||||
{
|
{
|
||||||
$debug = Nuh::$options['d'] ?? 0;
|
$debug = Nuh::$options['d'] ?? 0;
|
||||||
|
$print = Nuh::$options['p'] ?? 0;
|
||||||
|
$sport_id = Nuh::$options['sport_id'];
|
||||||
$dback = Nuh::$options['days'] ?? 1;
|
$dback = Nuh::$options['days'] ?? 1;
|
||||||
|
|
||||||
$singleday = Nuh::$options['day'] ?? 0;
|
$singleday = Nuh::$options['day'] ?? 0;
|
||||||
@@ -24,7 +25,27 @@ class Events
|
|||||||
$dback = 1;
|
$dback = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$force = Nuh::$options['f'] ?? 0;
|
if($print){
|
||||||
|
for ($i = 1; $i <= $dback; $i++) {
|
||||||
|
$day = Carbon::now()->subDays($i)->format('Y-m-d');
|
||||||
|
if ($debug) {
|
||||||
|
Notice::note($day, 'p');
|
||||||
|
}
|
||||||
|
if(Nuh::$options['groups']){
|
||||||
|
$tornaments = explode(',', Nuh::$options['groups']) ?? 0;
|
||||||
|
$ss_days = SofaScoreDayTournament::with('tournament')
|
||||||
|
->when($tornaments, function ($query) use ($tornaments) {
|
||||||
|
return $query->whereIn('tournament_id', $tornaments);
|
||||||
|
})
|
||||||
|
->whereHas('tournament', function ($query) use ($sport_id) {
|
||||||
|
$query->where('sport_id', $sport_id);
|
||||||
|
})
|
||||||
|
->where('day', $day)->get();
|
||||||
|
Notice::note($ss_days, 'p');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* world cup => 16
|
* world cup => 16
|
||||||
@@ -32,7 +53,6 @@ class Events
|
|||||||
*/
|
*/
|
||||||
$tornaments = explode(',', Nuh::$options['groups']) ?? 0;
|
$tornaments = explode(',', Nuh::$options['groups']) ?? 0;
|
||||||
|
|
||||||
$sport_id = Nuh::$options['sport_id'];
|
|
||||||
|
|
||||||
// for ($i = 1; $i <= $dback; $i++) {
|
// for ($i = 1; $i <= $dback; $i++) {
|
||||||
// // remove one day to start yesterday
|
// // remove one day to start yesterday
|
||||||
|
|||||||
@@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
namespace App\Console\Commands\Grapper\Sofascore;
|
namespace App\Console\Commands\Grapper\Sofascore;
|
||||||
|
|
||||||
use App\Console\Commands\Curl;
|
|
||||||
use App\Console\Commands\Grapper\Sofascore;
|
|
||||||
use App\Console\Commands\Nuh;
|
use App\Console\Commands\Nuh;
|
||||||
use App\Models\Country;
|
use App\Models\Country;
|
||||||
use App\Models\SofaScoreCategorie;
|
use App\Models\SofaScoreCategorie;
|
||||||
@@ -179,7 +177,9 @@ class Tournament
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
Notice::note("tournaments: $tournaments_counter", 'p');
|
if ($debug) {
|
||||||
|
Notice::note("tournaments: $tournaments_counter", 'p');
|
||||||
|
}
|
||||||
|
|
||||||
SofaScoreDay::updateOrCreate(['day' => $day], [$sport->ss_slug => 1]);
|
SofaScoreDay::updateOrCreate(['day' => $day], [$sport->ss_slug => 1]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ class Nuh extends Command
|
|||||||
$txt .= '--day (optional) grap day format "Y-m-d" or --t for today' . PHP_EOL;
|
$txt .= '--day (optional) grap day format "Y-m-d" or --t for today' . PHP_EOL;
|
||||||
$txt .= '--days (optional) grap days back from yesterday' . PHP_EOL;
|
$txt .= '--days (optional) grap days back from yesterday' . PHP_EOL;
|
||||||
$txt .= '--groups (optional) csv of tournament_id\'s' . PHP_EOL;
|
$txt .= '--groups (optional) csv of tournament_id\'s' . PHP_EOL;
|
||||||
|
$txt .= '--p will print days and tournaments and stop' . PHP_EOL;
|
||||||
$txt .= '-----------------------------------------------------------' . PHP_EOL . PHP_EOL;
|
$txt .= '-----------------------------------------------------------' . PHP_EOL . PHP_EOL;
|
||||||
$txt .= 'Options' . PHP_EOL;
|
$txt .= 'Options' . PHP_EOL;
|
||||||
$txt .= '-----------------------------------------------------------' . PHP_EOL;
|
$txt .= '-----------------------------------------------------------' . PHP_EOL;
|
||||||
|
|||||||
Generated
+38
-38
@@ -2196,22 +2196,22 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "guzzlehttp/guzzle",
|
"name": "guzzlehttp/guzzle",
|
||||||
"version": "7.12.0",
|
"version": "7.12.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/guzzle/guzzle.git",
|
"url": "https://github.com/guzzle/guzzle.git",
|
||||||
"reference": "eaa81598031cf57a9e36258c8546defffc994cba"
|
"reference": "d34627490fbc03bf5c5d7cfed81f2faa19519425"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/eaa81598031cf57a9e36258c8546defffc994cba",
|
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/d34627490fbc03bf5c5d7cfed81f2faa19519425",
|
||||||
"reference": "eaa81598031cf57a9e36258c8546defffc994cba",
|
"reference": "d34627490fbc03bf5c5d7cfed81f2faa19519425",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"guzzlehttp/promises": "^2.5",
|
"guzzlehttp/promises": "^2.5",
|
||||||
"guzzlehttp/psr7": "^2.12",
|
"guzzlehttp/psr7": "^2.12.1",
|
||||||
"php": "^7.2.5 || ^8.0",
|
"php": "^7.2.5 || ^8.0",
|
||||||
"psr/http-client": "^1.0",
|
"psr/http-client": "^1.0",
|
||||||
"symfony/deprecation-contracts": "^2.5 || ^3.0",
|
"symfony/deprecation-contracts": "^2.5 || ^3.0",
|
||||||
@@ -2224,7 +2224,7 @@
|
|||||||
"bamarni/composer-bin-plugin": "^1.8.2",
|
"bamarni/composer-bin-plugin": "^1.8.2",
|
||||||
"ext-curl": "*",
|
"ext-curl": "*",
|
||||||
"guzzle/client-integration-tests": "3.0.2",
|
"guzzle/client-integration-tests": "3.0.2",
|
||||||
"guzzlehttp/test-server": "^0.5",
|
"guzzlehttp/test-server": "^0.5.1",
|
||||||
"php-http/message-factory": "^1.1",
|
"php-http/message-factory": "^1.1",
|
||||||
"phpunit/phpunit": "^8.5.52 || ^9.6.34",
|
"phpunit/phpunit": "^8.5.52 || ^9.6.34",
|
||||||
"psr/log": "^1.1 || ^2.0 || ^3.0"
|
"psr/log": "^1.1 || ^2.0 || ^3.0"
|
||||||
@@ -2304,7 +2304,7 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/guzzle/guzzle/issues",
|
"issues": "https://github.com/guzzle/guzzle/issues",
|
||||||
"source": "https://github.com/guzzle/guzzle/tree/7.12.0"
|
"source": "https://github.com/guzzle/guzzle/tree/7.12.1"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -2320,7 +2320,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2026-06-16T22:11:48+00:00"
|
"time": "2026-06-18T14:12:49+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "guzzlehttp/promises",
|
"name": "guzzlehttp/promises",
|
||||||
@@ -2408,16 +2408,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "guzzlehttp/psr7",
|
"name": "guzzlehttp/psr7",
|
||||||
"version": "2.12.0",
|
"version": "2.12.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/guzzle/psr7.git",
|
"url": "https://github.com/guzzle/psr7.git",
|
||||||
"reference": "9b38012e7b54f594707e6db52c684dc0a74b3a43"
|
"reference": "172ef2f4e9824c1e058b7f30be8ae25a02c0f2b7"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/9b38012e7b54f594707e6db52c684dc0a74b3a43",
|
"url": "https://api.github.com/repos/guzzle/psr7/zipball/172ef2f4e9824c1e058b7f30be8ae25a02c0f2b7",
|
||||||
"reference": "9b38012e7b54f594707e6db52c684dc0a74b3a43",
|
"reference": "172ef2f4e9824c1e058b7f30be8ae25a02c0f2b7",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -2507,7 +2507,7 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/guzzle/psr7/issues",
|
"issues": "https://github.com/guzzle/psr7/issues",
|
||||||
"source": "https://github.com/guzzle/psr7/tree/2.12.0"
|
"source": "https://github.com/guzzle/psr7/tree/2.12.1"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -2523,7 +2523,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2026-06-16T21:50:11+00:00"
|
"time": "2026-06-18T09:49:37+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "guzzlehttp/uri-template",
|
"name": "guzzlehttp/uri-template",
|
||||||
@@ -4350,16 +4350,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "mongodb/laravel-mongodb",
|
"name": "mongodb/laravel-mongodb",
|
||||||
"version": "5.8.1",
|
"version": "5.8.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/mongodb/laravel-mongodb",
|
"url": "https://github.com/mongodb/laravel-mongodb",
|
||||||
"reference": "c372bc42529c51845fdccf89be8e1f6e39597ca0"
|
"reference": "179946ce5ee892c0c9227a12cc3c09db204c8e82"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/mongodb/laravel-mongodb/zipball/c372bc42529c51845fdccf89be8e1f6e39597ca0",
|
"url": "https://api.github.com/repos/mongodb/laravel-mongodb/zipball/179946ce5ee892c0c9227a12cc3c09db204c8e82",
|
||||||
"reference": "c372bc42529c51845fdccf89be8e1f6e39597ca0",
|
"reference": "179946ce5ee892c0c9227a12cc3c09db204c8e82",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -4453,7 +4453,7 @@
|
|||||||
"issues": "https://www.mongodb.com/support",
|
"issues": "https://www.mongodb.com/support",
|
||||||
"security": "https://www.mongodb.com/security"
|
"security": "https://www.mongodb.com/security"
|
||||||
},
|
},
|
||||||
"time": "2026-06-10T08:01:44+00:00"
|
"time": "2026-06-17T11:34:44+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "mongodb/mongodb",
|
"name": "mongodb/mongodb",
|
||||||
@@ -4637,16 +4637,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "nesbot/carbon",
|
"name": "nesbot/carbon",
|
||||||
"version": "3.12.3",
|
"version": "3.13.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/CarbonPHP/carbon.git",
|
"url": "https://github.com/CarbonPHP/carbon.git",
|
||||||
"reference": "6e7853a668c3107294aff38d42bf760ec02126b6"
|
"reference": "40f6618f052df16b545f626fbf9a878e6497d16a"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/CarbonPHP/carbon/zipball/6e7853a668c3107294aff38d42bf760ec02126b6",
|
"url": "https://api.github.com/repos/CarbonPHP/carbon/zipball/40f6618f052df16b545f626fbf9a878e6497d16a",
|
||||||
"reference": "6e7853a668c3107294aff38d42bf760ec02126b6",
|
"reference": "40f6618f052df16b545f626fbf9a878e6497d16a",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -4738,7 +4738,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2026-06-14T20:41:42+00:00"
|
"time": "2026-06-18T13:49:15+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "nette/php-generator",
|
"name": "nette/php-generator",
|
||||||
@@ -6156,20 +6156,20 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ramsey/uuid",
|
"name": "ramsey/uuid",
|
||||||
"version": "4.9.2",
|
"version": "4.9.3",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/ramsey/uuid.git",
|
"url": "https://github.com/ramsey/uuid.git",
|
||||||
"reference": "8429c78ca35a09f27565311b98101e2826affde0"
|
"reference": "1df15849d00943a67d677dc9cfd80795f038c9f8"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/ramsey/uuid/zipball/8429c78ca35a09f27565311b98101e2826affde0",
|
"url": "https://api.github.com/repos/ramsey/uuid/zipball/1df15849d00943a67d677dc9cfd80795f038c9f8",
|
||||||
"reference": "8429c78ca35a09f27565311b98101e2826affde0",
|
"reference": "1df15849d00943a67d677dc9cfd80795f038c9f8",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"brick/math": "^0.8.16 || ^0.9 || ^0.10 || ^0.11 || ^0.12 || ^0.13 || ^0.14",
|
"brick/math": ">=0.8.16 <=0.18",
|
||||||
"php": "^8.0",
|
"php": "^8.0",
|
||||||
"ramsey/collection": "^1.2 || ^2.0"
|
"ramsey/collection": "^1.2 || ^2.0"
|
||||||
},
|
},
|
||||||
@@ -6228,9 +6228,9 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/ramsey/uuid/issues",
|
"issues": "https://github.com/ramsey/uuid/issues",
|
||||||
"source": "https://github.com/ramsey/uuid/tree/4.9.2"
|
"source": "https://github.com/ramsey/uuid/tree/4.9.3"
|
||||||
},
|
},
|
||||||
"time": "2025-12-14T04:43:48+00:00"
|
"time": "2026-06-18T03:57:49+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ryangjchandler/blade-capture-directive",
|
"name": "ryangjchandler/blade-capture-directive",
|
||||||
@@ -12197,21 +12197,21 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "rector/rector",
|
"name": "rector/rector",
|
||||||
"version": "2.4.5",
|
"version": "2.5.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/rectorphp/rector.git",
|
"url": "https://github.com/rectorphp/rector.git",
|
||||||
"reference": "cbd86024be5014d3c14d9f0b3f7aae8ecbffd62c"
|
"reference": "49ff6339174bdbdf50b0b35ecbcff14a05ac9e24"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/rectorphp/rector/zipball/cbd86024be5014d3c14d9f0b3f7aae8ecbffd62c",
|
"url": "https://api.github.com/repos/rectorphp/rector/zipball/49ff6339174bdbdf50b0b35ecbcff14a05ac9e24",
|
||||||
"reference": "cbd86024be5014d3c14d9f0b3f7aae8ecbffd62c",
|
"reference": "49ff6339174bdbdf50b0b35ecbcff14a05ac9e24",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^7.4|^8.0",
|
"php": "^7.4|^8.0",
|
||||||
"phpstan/phpstan": "^2.1.56"
|
"phpstan/phpstan": "^2.2.2"
|
||||||
},
|
},
|
||||||
"conflict": {
|
"conflict": {
|
||||||
"rector/rector-doctrine": "*",
|
"rector/rector-doctrine": "*",
|
||||||
@@ -12245,7 +12245,7 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/rectorphp/rector/issues",
|
"issues": "https://github.com/rectorphp/rector/issues",
|
||||||
"source": "https://github.com/rectorphp/rector/tree/2.4.5"
|
"source": "https://github.com/rectorphp/rector/tree/2.5.2"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -12253,7 +12253,7 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2026-05-26T21:03:22+00:00"
|
"time": "2026-06-22T11:39:33+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/cli-parser",
|
"name": "sebastian/cli-parser",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
function animate(element, end, duration = 500) {
|
function animate(element, end, duration = 500) {
|
||||||
// console.log(element, end);
|
// console.log("hallo", element, end);
|
||||||
|
|
||||||
var element = document.getElementById(element);
|
var element = document.getElementById(element);
|
||||||
const startTime = performance.now();
|
const startTime = performance.now();
|
||||||
|
|||||||
Reference in new issue
Block a user