mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-07-31 05:40:24 +02:00
[bridges] Change all occurrences of the Item object to array
This commit is contained in:
@@ -25,15 +25,15 @@ class RTBFBridge extends BridgeAbstract {
|
||||
|
||||
foreach($html->find('section[id!=widget-ml-avoiraussi-] .rtbf-media-grid article') as $element) {
|
||||
if($count < $limit) {
|
||||
$item = new \Item();
|
||||
$item->id = $element->getAttribute('data-id');
|
||||
$item->uri = 'http://www.rtbf.be/auvio/detail?id='.$item->id;
|
||||
$item = array();
|
||||
$item['id'] = $element->getAttribute('data-id');
|
||||
$item['uri'] = 'http://www.rtbf.be/auvio/detail?id='.$item['id'];
|
||||
$thumbnailUriSrcSet = explode(',', $element->find('figure .www-img-16by9 img', 0)->getAttribute('data-srcset'));
|
||||
$thumbnailUriLastSrc = end($thumbnailUriSrcSet);
|
||||
$thumbnailUri = explode(' ', $thumbnailUriLastSrc)[0];
|
||||
$item->title = trim($element->find('h3',0)->plaintext) . ' - ' . trim($element->find('h4',0)->plaintext);
|
||||
$item->timestamp = strtotime($element->find('time', 0)->getAttribute('datetime'));
|
||||
$item->content = '<a href="' . $item->uri . '"><img src="' . $thumbnailUri . '" /></a>';
|
||||
$item['title'] = trim($element->find('h3',0)->plaintext) . ' - ' . trim($element->find('h4',0)->plaintext);
|
||||
$item['timestamp'] = strtotime($element->find('time', 0)->getAttribute('datetime'));
|
||||
$item['content'] = '<a href="' . $item['uri'] . '"><img src="' . $thumbnailUri . '" /></a>';
|
||||
$this->items[] = $item;
|
||||
$count++;
|
||||
}
|
||||
|
Reference in New Issue
Block a user