mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-14 12:34:07 +02:00
[bridges] Change all occurrences of the Item object to array
This commit is contained in:
@@ -24,14 +24,14 @@ class DanbooruBridge extends BridgeAbstract{
|
||||
}
|
||||
$html = $this->getSimpleHTMLDOM("http://donmai.us/posts?&page=$page&tags=$tags") or $this->returnServerError('Could not request Danbooru.');
|
||||
foreach($html->find('div[id=posts] article') as $element) {
|
||||
$item = new \Item();
|
||||
$item->uri = 'http://donmai.us'.$element->find('a', 0)->href;
|
||||
$item->postid = (int)preg_replace("/[^0-9]/",'', $element->getAttribute('data-id'));
|
||||
$item->timestamp = time();
|
||||
$item = array();
|
||||
$item['uri'] = 'http://donmai.us'.$element->find('a', 0)->href;
|
||||
$item['postid'] = (int)preg_replace("/[^0-9]/",'', $element->getAttribute('data-id'));
|
||||
$item['timestamp'] = time();
|
||||
$thumbnailUri = 'http://donmai.us'.$element->find('img', 0)->src;
|
||||
$item->tags = $element->find('img', 0)->getAttribute('alt');
|
||||
$item->title = 'Danbooru | '.$item->postid;
|
||||
$item->content = '<a href="' . $item->uri . '"><img src="' . $thumbnailUri . '" /></a><br>Tags: '.$item->tags;
|
||||
$item['tags'] = $element->find('img', 0)->getAttribute('alt');
|
||||
$item['title'] = 'Danbooru | '.$item['postid'];
|
||||
$item['content'] = '<a href="' . $item['uri'] . '"><img src="' . $thumbnailUri . '" /></a><br>Tags: '.$item['tags'];
|
||||
$this->items[] = $item;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user