1
0
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:
logmanoriginal
2016-08-22 18:55:59 +02:00
parent 1f3361c6b4
commit bf0a9d754e
130 changed files with 844 additions and 844 deletions

View File

@@ -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++;
}