Archived
1
0
Fork 0

Fixed Textadventures

This commit is contained in:
Alexander Yakovlev 2017-12-29 06:53:58 +07:00
parent fe45c2a2a2
commit f4d7f674c2

View file

@ -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