mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-09 01:56:39 +02:00
[bridges] Change all occurrences of the Item object to array
This commit is contained in:
@@ -16,18 +16,18 @@ class ProjectMGameBridge extends BridgeAbstract{
|
||||
$html = $this->getSimpleHTMLDOM('http://projectmgame.com/en/') or $this->returnServerError('Error while downloading the Project M homepage');
|
||||
|
||||
foreach($html->find('article') as $article) {
|
||||
$item = new \Item();
|
||||
$item->uri = 'http://projectmgame.com/en/'.$article->find('section div.info_block a',0)->href;
|
||||
$item->title = $article->find('h1 p',0)->innertext;
|
||||
$item = array();
|
||||
$item['uri'] = 'http://projectmgame.com/en/'.$article->find('section div.info_block a',0)->href;
|
||||
$item['title'] = $article->find('h1 p',0)->innertext;
|
||||
|
||||
$p_list = $article->find('section p');
|
||||
$content = '';
|
||||
foreach($p_list as $p) $content .= $p->innertext;
|
||||
$item->content = $content;
|
||||
$item['content'] = $content;
|
||||
|
||||
// get publication date
|
||||
$str_date = $article->find('section div.info_block a',0)->innertext;
|
||||
$item->timestamp = strtotime($str_date);
|
||||
$item['timestamp'] = strtotime($str_date);
|
||||
$this->items[] = $item;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user