From 311a15dbb5c7740aa06c71601ce49c0c44b1f146 Mon Sep 17 00:00:00 2001 From: Bilge Date: Tue, 8 Nov 2022 10:44:24 +0000 Subject: [PATCH 1/2] Removed DiRT 4 test case as it is no longer available on the Steam store. --- test/Functional/ScrapeAppDetailsTest.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/Functional/ScrapeAppDetailsTest.php b/test/Functional/ScrapeAppDetailsTest.php index b94d18e..364143f 100644 --- a/test/Functional/ScrapeAppDetailsTest.php +++ b/test/Functional/ScrapeAppDetailsTest.php @@ -828,7 +828,6 @@ public function testSteamDeckPlayable(): void * @see https://store.steampowered.com/app/1262600/Need_for_Speed_Rivals * @see https://store.steampowered.com/app/1237950/STAR_WARS_Battlefront_II * @see https://store.steampowered.com/app/1237980/STAR_WARS_Battlefront - * @see https://store.steampowered.com/app/421020/DiRT_4 * @see https://store.steampowered.com/app/1238810/Battlefield_V * @see https://store.steampowered.com/app/1238840/Battlefield_1 * @see https://store.steampowered.com/app/1238860/Battlefield_4 @@ -887,7 +886,6 @@ public static function provideEaPlayRegularPurchaseAreas(): iterable 'Need for Speed Rivals' => [1262600], 'STAR WARS Battlefront II' => [1237950], 'STAR WARS Battlefront' => [1237980], - 'DiRT 4' => [421020], 'Battlefield V' => [1238810], 'Battlefield 1' => [1238840], 'Battlefield 4' => [1238860], From 94d2f7e4675d51c05432f128e4123b2551fb3c24 Mon Sep 17 00:00:00 2001 From: Bilge Date: Tue, 6 Dec 2022 14:51:16 +0000 Subject: [PATCH 2/2] Fixed VR exclusive parsing when store emits untranslated strings. --- src/Scrape/AppDetailsParser.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Scrape/AppDetailsParser.php b/src/Scrape/AppDetailsParser.php index 6bd7eaf..d234375 100644 --- a/src/Scrape/AppDetailsParser.php +++ b/src/Scrape/AppDetailsParser.php @@ -272,7 +272,10 @@ private static function parseDiscountPercentage(Crawler $purchaseArea): int private static function parseVrExclusive(Crawler $crawler): bool { foreach ($crawler->filter('.notice_box_content') as $element) { - if (preg_match('[Requires.+virtual reality headset]', $element->textContent)) { + if (preg_match( + '[Requires.+virtual reality headset|#Store_VR_HMD_Only_Purchase_Note_Multiple]', + $element->textContent + )) { return true; } }