This commit is contained in:
salam committed 2026-01-08 12:51:12 +01:00
1 parent fa0e2cdef1
commit 4f9125ef12
13 files changed
+100 -64

No files matched your search

@@ -20,7 +20,7 @@ class Bet365
{
$debug = Nuh::$options['d'] ?? 0;
$break = Nuh::$options['b'] ?? 0;
$today = Nuh::$options['t'] ?? 0;
$week = Nuh::$options['w'] ?? 0;
@@ -29,7 +29,7 @@ class Bet365
*/
$bookmaker_id = 126;
if ($break) {
if ($today) {
$events = Event::where('bet365_id', '>', 0)->where('starttime', '>', Carbon::now()->toDateTimeString())->where('starttime', '<', Carbon::now()->addDay()->toDateTimeString())->select('id', 'sport_id', 'bet365_id', 'starttime')->get();
} elseif ($week) {
$events = Event::where('bet365_id', '>', 0)->where('starttime', '>', Carbon::now()->toDateTimeString())->where('starttime', '<', Carbon::now()->addDays(7)->toDateTimeString())->select('id', 'sport_id', 'bet365_id', 'starttime')->get();
@@ -23,7 +23,7 @@ class Fixtures
{
$debug = Nuh::$options['d'] ?? 0;
$break = Nuh::$options['b'] ?? 0;
$today = Nuh::$options['t'] ?? 0;
/**
* Delete Started
@@ -108,7 +108,7 @@ class Fixtures
}
}
if ($break) {
if ($today) {
break;
}
}
@@ -3,14 +3,12 @@
namespace App\Console\Commands\Grapper\Logifuture;
use App\Console\Commands\Nuh;
use App\Console\Commands\Grapper\Logifuture\Auth;
class BaseUrl
{
public static function get()
{
$test = Nuh::$options['t'] ?? 0;
$test = false;
switch (Nuh::$options['provider_id']) {
case 5:
if ($test) {
@@ -9,7 +9,7 @@ class BaseUrl
{
public static function get()
{
$test = Nuh::$options['t'] ?? 0;
$test = 0;
switch (Nuh::$options['provider_id']) {
case 3:
@@ -17,7 +17,7 @@ class Fixtures
{
$debug = Nuh::$options['d'] ?? 0;
$echo = Nuh::$options['e'] ?? 0;
$break = Nuh::$options['b'] ?? 0;
$break = Nuh::$options['t'] ?? 0;
$week = Nuh::$options['w'] ?? 0;
$count = 0;
@@ -38,7 +38,7 @@ class Fixtures
/**
* Grap
*/
for ($i = 0; $i < 30; $i++) {
for ($i = Nuh::$options['days_from']; $i < Nuh::$options['days_to']; $i++) {
$url = 'https://xml2.txodds.com/feed/result/xml.php?'.Nuh::$AUTHTOKEN.'&date='.$now->toDateString().','.$now->addDays(1)->toDateString();
+47 -16
View File
@@ -88,7 +88,6 @@ class Odds
*************************************************/
$debug = Nuh::$options['d'] ?? 0;
$echo = Nuh::$options['e'] ?? 0;
switch (Nuh::$options['sport_id']) {
case 1:
@@ -118,38 +117,74 @@ class Odds
*************************************************/
$url = 'https://xml2.txodds.com/feed/odds/xml.php?'.Nuh::$AUTHTOKEN.'&all_odds=2&spid='.Nuh::$options['sport_id'];
$_calls = [];
if (Nuh::$options['event_id']) {
// by id
$_calls[] = $url."&ot=$markets&peid=".Nuh::$options['event_id'];
if (Nuh::$options['id']) {
if ($debug) {
Notice::note('BY ID', 'p');
}
/**
* BY ID
*/
$_calls[] = $url."&ot=$markets&peid=".Nuh::$options['id'];
} elseif (Nuh::$options['a']) {
// all existing
if ($debug) {
Notice::note('ALL EXISTING', 'p');
}
/**
* ALL EXISTING
*/
$res = Event::where('starttime', '>', Carbon::now()->toDateTimeString())->pluck('id');
foreach ($res as $id) {
$_calls[] = $url."&ot=$markets&peid=".$id;
}
} elseif (Nuh::$options['g']) {
// one week per group names (mybee fastes)
if ($debug) {
Notice::note('PER GROUP_ID', 'p');
}
/**
* PER GROUP_ID
*
* with from-to days
*/
$groupids = Event::where('starttime', '>', Carbon::now()->toDateTimeString())->groupBy('group_id')->pluck('group_id');
foreach ($groupids as $groupid) {
$_calls[] = $url = 'https://xml2.txodds.com/feed/odds/xml.php?'.Nuh::$AUTHTOKEN.'&all_odds=2&ot='.$markets.'&days=0,1&pgid='.$groupid;
$_calls[] = $url = 'https://xml2.txodds.com/feed/odds/xml.php?'.Nuh::$AUTHTOKEN.'&all_odds=2&ot='.$markets.'&days='.Nuh::$options['days_from'].','.Nuh::$options['days_to'].'&pgid='.$groupid;
}
} elseif (Nuh::$options['b']) {
// one day
} elseif (Nuh::$options['t']) {
if ($debug) {
Notice::note('TODAY', 'p');
}
/**
* TODAY
*/
$res = Event::where('starttime', '>', Carbon::now()->toDateTimeString())->where('starttime', '<', Carbon::now()->addDays(1)->toDateTimeString())->pluck('id');
foreach ($res as $id) {
$_calls[] = $url."&ot=$markets&peid=".$id;
}
} elseif (Nuh::$options['w']) {
// one week
if ($debug) {
Notice::note('ONE WEEK FROM NOW', 'p');
}
/**
* ONE WEEK
*/
$res = Event::where('starttime', '>', Carbon::now()->toDateTimeString())->where('starttime', '<', Carbon::now()->addDays(7)->toDateTimeString())->pluck('id');
foreach ($res as $id) {
$_calls[] = $url."&ot=$markets&peid=".$id;
}
} else {
// all with lastcall
$_calls[] = $url."&ot=$markets&last=".Nuh::$options['lastcall'];
if ($debug) {
Notice::note('WITH LASTCALL Parameter', 'p');
}
/**
* WITH LASTCALL Parameter
* with from-to days
*/
$_calls[] = $url."&ot=$markets&days=".Nuh::$options['days_from'].','.Nuh::$options['days_to'].'&last='.Nuh::$options['lastcall'];
}
dd($_calls);
/*************************************************
* CALL
*************************************************/
@@ -160,10 +195,6 @@ class Odds
$data = Xml::load($url);
if ($echo) {
dd($data);
}
if ($debug) {
Notice::note('counter: '.count($_calls).'/'.$counter, 'g');
}