LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-25-2021, 08:38 PM   #1
keithostertag
Member
 
Registered: Jul 2011
Location: Harrisburg, PA
Posts: 127

Rep: Reputation: Disabled
How to use googler on Debian? results are always "no results"


I'm using Debian 10 (buster). I used my apt package manager to install the program "googler", but when I run it I never get any results. So I am wondering if I have some type of setup problem with my system?

I am not seeing anything in the manpages to indicate what I might be doing wrong. I've tried several of the examples in the manpage with the same "no results".

I should add that I get the same results when attempting to run ddgr.

Code:
keith@ada:~$ googler -d hello world
[DEBUG] googler version 3.7.1
[DEBUG] Python version 3.7.3
[DEBUG] Connecting to new host www.google.com
[DEBUG] Fetching URL /search?ie=UTF-8&oe=UTF-8&q=hello+world
[DEBUG] Cookie: 1P_JAR=2021-11-26-02
[DEBUG] Response body written to '/tmp/googler-response-rf_b0j8d'.
No results.
From the man page:
Code:
GOOGLER(1)                       User Commands                     GOOGLER(1)

NAME
       googler - Google from the command-line

SYNOPSIS
       googler [OPTIONS] [KEYWORD [KEYWORD ...]]

DESCRIPTION
       googler  is  a command-line tool to search Google (Web & News) from the terminal. Google site search works too. googler shows  the  title,  URL
and text context for each result. Results are fetched in pages. Next or previous page navigation is possible using keyboard shortcuts.  Results are indexed and a result URL can be opened in a browser using the index number. There is no configuration file as aliases serve the  same  purpose  for  this  utility.  Supports sequential searches in a single instance.

Last edited by keithostertag; 11-25-2021 at 08:40 PM.
 
Old 11-25-2021, 11:44 PM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
An 'apt-cache show googler' on Debian 10 says the software comes from here: https://github.com/jarun/googler
I recommend reading the documentation.
BUT - Even if the github repo has been updated fairly recently, the version in Debian 10 repos probably hasn't.
Google are very good at preventing this kind of non-standard usage of their services, and are shifting their APIs around all the time.
Just like youtube-dl, this type of software requires constant maintenance & updating.

Just in case there's another reason why this isn't working: How are you connecting to google resp. the internet? VPN? TOR? Can you search Google normally with your browser?
 
Old 11-26-2021, 02:05 AM   #3
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
Google are very good at preventing this kind of non-standard usage of their services, and are shifting their APIs around all the time.
Just like youtube-dl, this type of software requires constant maintenance & updating.
^This. googler 3.7.1 is quite old. I'm getting similar results with googler 4.2 on CentOS 8:
Code:
$ googler -d hello world
[DEBUG] googler version 4.2
[DEBUG] Python version 3.6.8
[DEBUG] Platform: Linux-4.18.0-348.2.1.el8_5.x86_64-x86_64-with-centos-8.5.2111
The latest release of googler is v4.3.2, please upgrade.
[DEBUG] Connecting to proxy server localhost:8118
[DEBUG] Tunnelling to host www.google.com
[DEBUG] Opened socket to 127.0.0.1:8118
[DEBUG] Fetching URL /search?ie=UTF-8&oe=UTF-8&q=hello+world&sei=JQlJwk6OEeyfJgAZmb2hBg
[DEBUG] Cookie: CONSENT=PENDING+395
[DEBUG] Response body written to '/dev/shm/googler-response-921jqxfr.html'.
No results.
If you believe this is a bug, please review https://git.io/googler-no-results before submitting a bug report.
See https://git.io/googler-no-results mentioned in the last line.

BTW, /dev/shm/googler-response-921jqxfr.html shows the privacy policy message from Google with "Click here to agree", after which come the search results for "hello world". The name of the cookie in my case, CONSENT=PENDING+395, is telling as well.

OTOH, ddgr 1.9 works just fine there.

Update. To prove the point, I've just rebuilt googler 4.3.2 from Fedora Rawhide source RPM, and lo and behold, it works.

Last edited by shruggy; 11-26-2021 at 02:31 AM.
 
Old 11-26-2021, 08:41 PM   #4
keithostertag
Member
 
Registered: Jul 2011
Location: Harrisburg, PA
Posts: 127

Original Poster
Rep: Reputation: Disabled
Thank you shruggy and ondoho. Indeed, the problem was that the Debian repository versions of both googler and ddgr were both old. I downloaded the latest stable release of each and they are now both working. And thank you for the additional details.

I will mark this thread resolved.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Googler – Google Search from the command line on Linux LXer Syndicated Linux News 0 09-23-2016 09:01 AM
LXer: How To Google Search In Command Line Using Googler LXer Syndicated Linux News 0 09-18-2016 04:01 AM
Command ls --color=always, can always be always Kevin Tough Linux - Newbie 1 09-08-2005 11:05 PM
call for Googler's help =) doublefailure General 10 04-16-2003 10:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration