Archived
1
0
Fork 0

replace textadventures

This commit is contained in:
Alexander Yakovlev 2020-10-30 14:21:55 +07:00
parent c45f8a2817
commit 19f764053f
Signed by: oreolek
GPG key ID: 1CDC4B7820C93BD3

View file

@ -79,6 +79,7 @@ class Textadventures extends Source {
if ($game_page->filter('body > div:nth-child(5) > div:nth-child(1) > div > div.container > div > div.col-md-9 > div.row > div.col-md-7')->count()) {
$game->description = trim($game_page->filter('body > div:nth-child(5) > div:nth-child(1) > div > div.container > div > div.col-md-9 > div.row > div.col-md-7')->first()->text());
$game->description = preg_replace('/ Play online$/', '', $game->description);
$game->description = 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', '', $game->description);
}
$image = $game_page->filter('img.cover-image')->first();
if ($image->count()) {