Fix Hellcase Battles job
This commit is contained in:
@@ -94,7 +94,7 @@ class HellcaseBattlesJob extends HellcaseJob implements ShouldBeUniqueUntilProce
|
|||||||
|
|
||||||
sleep(5);
|
sleep(5);
|
||||||
|
|
||||||
$battles = $browser->driver->findElements(WebDriverBy::xpath("//*[contains(@class, 'casebattle-table__item')]"));
|
$battles = $browser->driver->findElements(WebDriverBy::xpath("//*[contains(@class, '_base_vzctn_1')]"));
|
||||||
$battle = $battles[$battleIndex];
|
$battle = $battles[$battleIndex];
|
||||||
$battleIndex++;
|
$battleIndex++;
|
||||||
$browser->scrollIntoView(".casebattle-table__item:nth-child(" . max($battleIndex -1, 1) . ")");
|
$browser->scrollIntoView(".casebattle-table__item:nth-child(" . max($battleIndex -1, 1) . ")");
|
||||||
@@ -102,7 +102,7 @@ class HellcaseBattlesJob extends HellcaseJob implements ShouldBeUniqueUntilProce
|
|||||||
$battleValue = floatval(
|
$battleValue = floatval(
|
||||||
explode(
|
explode(
|
||||||
"\n",
|
"\n",
|
||||||
$battle->findElement(WebDriverBy::xpath("./div/div[contains(@class, 'core-price')]"))->getDomProperty("innerText")
|
$battle->findElement(WebDriverBy::xpath("./span[contains(@class, '_price_11qqy_12')]"))->getDomProperty("innerText")
|
||||||
)[1]
|
)[1]
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -111,7 +111,7 @@ class HellcaseBattlesJob extends HellcaseJob implements ShouldBeUniqueUntilProce
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$battleLinkButton = $battle->findElement(WebDriverBy::xpath("./div//button[.//*[text() = 'watch']]"));
|
$battleLinkButton = $battle->findElement(WebDriverBy::xpath(".//button[.//*[text() = 'watch']]"));
|
||||||
$battleLinkButton->sendKeys("\n");
|
$battleLinkButton->sendKeys("\n");
|
||||||
sleep(3);
|
sleep(3);
|
||||||
try { // If we still are on the casebattle page, it means the battle was cancelled or something else
|
try { // If we still are on the casebattle page, it means the battle was cancelled or something else
|
||||||
|
|||||||
@@ -2,13 +2,11 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use App\Exception\JobException;
|
|
||||||
use App\Models\Job;
|
use App\Models\Job;
|
||||||
use App\Services\BrowserJobsInstances;
|
use App\Services\BrowserJobsInstances;
|
||||||
use Cache;
|
use Cache;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Inertia\Inertia;
|
use Inertia\Inertia;
|
||||||
use App\Exception\JobTestException;
|
|
||||||
|
|
||||||
class JobController extends Controller
|
class JobController extends Controller
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user