[GoogleSearchBridge] fix line length + code simplification
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
parent
2496f1374d
commit
8e3f6dbc73
1 changed files with 4 additions and 2 deletions
|
@ -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) ){
|
||||
|
|
Loading…
Reference in a new issue