[GoogleSearchBridge] fix line length + code simplification

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
Pierre Mazière 2016-08-29 00:41:47 +02:00
parent 2496f1374d
commit 8e3f6dbc73

View file

@ -9,7 +9,6 @@
*/
class GoogleSearchBridge extends BridgeAbstract{
public $maintainer = "sebsauvage";
public $name = "Google search";
public $uri = "https://www.google.com/";
@ -26,7 +25,10 @@ class GoogleSearchBridge extends BridgeAbstract{
public function collectData(){
$html = '';
$html = $this->getSimpleHTMLDOM('https://www.google.com/search?q=' . urlencode($this->getInput('q')) . '&num=100&complete=0&tbs=qdr:y,sbd:1') or $this->returnServerError('No results for this query.');
$html = $this->getSimpleHTMLDOM($this->uri
.'search?q=' . urlencode($this->getInput('q'))
.'&num=100&complete=0&tbs=qdr:y,sbd:1')
or $this->returnServerError('No results for this query.');
$emIsRes = $html->find('div[id=ires]',0);
if( !is_null($emIsRes) ){