[ProjectMGameBridge] code simplification
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
parent
662c1b6410
commit
08158825d9
1 changed files with 3 additions and 3 deletions
|
@ -8,12 +8,12 @@ class ProjectMGameBridge extends BridgeAbstract{
|
||||||
|
|
||||||
|
|
||||||
public function collectData(){
|
public function collectData(){
|
||||||
$html = '';
|
$html = $this->getSimpleHTMLDOM($this->uri)
|
||||||
$html = $this->getSimpleHTMLDOM('http://projectmgame.com/en/') or $this->returnServerError('Error while downloading the Project M homepage');
|
or $this->returnServerError('Error while downloading the Project M homepage');
|
||||||
|
|
||||||
foreach($html->find('article') as $article) {
|
foreach($html->find('article') as $article) {
|
||||||
$item = array();
|
$item = array();
|
||||||
$item['uri'] = 'http://projectmgame.com/en/'.$article->find('section div.info_block a',0)->href;
|
$item['uri'] = $this->uri.$article->find('section div.info_block a',0)->href;
|
||||||
$item['title'] = $article->find('h1 p',0)->innertext;
|
$item['title'] = $article->find('h1 p',0)->innertext;
|
||||||
|
|
||||||
$p_list = $article->find('section p');
|
$p_list = $article->find('section p');
|
||||||
|
|
Loading…
Reference in a new issue