22 lines
683 B
PHP
22 lines
683 B
PHP
<?php
|
|
namespace Source;
|
|
|
|
use \Game;
|
|
|
|
class Urq extends Source {
|
|
public $title = "Библиотека URQ";
|
|
protected function parse() {
|
|
$text = $this->get_text('http://urq.plut.info/node/209');
|
|
$this->dom->loadStr($text, []);
|
|
unset($text);
|
|
$games = $this->dom->find('.view-NewGames tr');
|
|
foreach ($games as $gameBlock) {
|
|
$game = new Game;
|
|
$game->author = trim($gameBlock->find('.views-field-taxonomy-vocabulary-2')->innerHtml);
|
|
$game->title = trim($gameBlock->find('.views-field-title')->innerHtml);
|
|
$game->url = trim($gameBlock->find('.views-field-title a')->getAttribute('href'));
|
|
$this->output .= $game->print();
|
|
}
|
|
}
|
|
}
|