1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-13 03:54:04 +02:00

Corrections

* Corrected GoogleBridge (URI extraction was incorrect)
* Corrected ATOM format:
* mime-type was incorrect
* Hyperlinks were not clickable.
* non-UTF8 characters are now properly filtered.
* Corrected HTML format output:
* Hyperlinks were not clickable.
* Corrected error message when SimpleHtmlDom library is not installed.
* Added changelog.
This commit is contained in:
Sebastien SAUVAGE
2013-08-12 22:37:19 +02:00
parent a84f111d8f
commit 4bf90735ef
7 changed files with 70 additions and 24 deletions

View File

@@ -28,8 +28,13 @@ 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->uri = $element->find('a[href]',0)->href;
$item = new Item();
// Extract direct URL from google href (eg. /url?q=...)
$t = $element->find('a[href]',0)->href;
$item->uri = 'http://google.com'.$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;
$this->items[] = $item;