From f4d7f674c23925a3a11fbdab43d20c98acb45dd5 Mon Sep 17 00:00:00 2001 From: Alexander Yakovlev Date: Fri, 29 Dec 2017 06:53:58 +0700 Subject: [PATCH] Fixed Textadventures --- Source/Textadventures.php | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/Source/Textadventures.php b/Source/Textadventures.php index ed5e8fa..3a17374 100644 --- a/Source/Textadventures.php +++ b/Source/Textadventures.php @@ -23,19 +23,11 @@ class Textadventures extends Source { unset($text); try { $game->author = str_replace('by ', '', $game_page->find('h1 small')->innerHtml); - $desc = $game_page->find('.col-md-12 .col-md-10 .col-md-7')[0]; + $desc = $game_page->find('.col-md-12 .col-md-9 .col-md-7')[0]; if ($desc) { + $play = $desc->find('.play-buttons'); $desc = strip_tags($desc->innerHtml); - $game->description = trim(str_replace( - 'You are not logged in. If you log in before playing, you\'ll be able to save your progress - which means you can come back later and pick up where you left off. Log in Play online', - '', - $desc - )); - $game->description = trim(str_replace( - ' Play online', - '', - $desc - )); + $game->description = trim(str_replace(strip_tags($play->innerHtml), '', $desc)); } } catch (\Exception $e) {} // probably a 18+ game, no info on game page