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:
@@ -39,15 +39,15 @@ class GoogleSearchBridge extends BridgeAbstract{
|
||||
$emIsRes = $html->find('div[id=ires]',0);
|
||||
if( !is_null($emIsRes) ){
|
||||
foreach($emIsRes->find('li[class=g]') as $element) {
|
||||
$item = new Item();
|
||||
$item = array();
|
||||
|
||||
// Extract direct URL from google href (eg. /url?q=...)
|
||||
$t = $element->find('a[href]',0)->href;
|
||||
$item->uri = ''.$t;
|
||||
$item['uri'] = ''.$t;
|
||||
parse_str(parse_url($t, PHP_URL_QUERY),$parameters);
|
||||
if (isset($parameters['q'])) { $item->uri = $parameters['q']; }
|
||||
$item->title = $element->find('h3',0)->plaintext;
|
||||
$item->content = $element->find('span[class=st]',0)->plaintext;
|
||||
if (isset($parameters['q'])) { $item['uri'] = $parameters['q']; }
|
||||
$item['title'] = $element->find('h3',0)->plaintext;
|
||||
$item['content'] = $element->find('span[class=st]',0)->plaintext;
|
||||
$this->items[] = $item;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user