mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-04 18:14:44 +02:00
[bridges] Change all occurrences of the Item object to array
This commit is contained in:
parent
1f3361c6b4
commit
bf0a9d754e
130 changed files with 844 additions and 844 deletions
|
@ -14,22 +14,22 @@ class EliteDangerousGalnetBridge extends BridgeAbstract
|
|||
{
|
||||
$html = $this->getSimpleHTMLDOM('https://community.elitedangerous.com/galnet') or $this->returnServerError('Error while downloading the website content');
|
||||
foreach($html->find('div.article') as $element) {
|
||||
$item = new Item();
|
||||
$item = array();
|
||||
|
||||
$uri = $element->find('h3 a', 0)->href;
|
||||
$uri = 'https://community.elitedangerous.com' . $uri;
|
||||
$item->uri = $uri;
|
||||
$item['uri'] = $uri;
|
||||
|
||||
$title = $element->find('h3 a', 0)->plaintext;
|
||||
$item->title = substr($title, 1); //remove the space between icon and title
|
||||
$item['title'] = substr($title, 1); //remove the space between icon and title
|
||||
|
||||
$content = $element->find('p', -1)->innertext;
|
||||
$item->content = $content;
|
||||
$item['content'] = $content;
|
||||
|
||||
$date = $element->find('p.small', 0)->innertext;
|
||||
$article_year = substr($date, -4) - 1286; //Convert E:D date to actual date
|
||||
$date = substr($date, 0, -4) . $article_year;
|
||||
$item->timestamp = strtotime($date);
|
||||
$item['timestamp'] = strtotime($date);
|
||||
|
||||
$this->items[] = $item;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue