1. 5
    Surfraw browsers gitlab.com
    1. 1

      what does it do when google gives you a captcha?

      1. 1

        what does it do when google gives you a captcha?

        Not sure, it hasn’t happened to me so far.

      2. 1

        It reclaims google, altavista, babelfish, dejanews, freshmeat, research index, slashdot and many others from the false-prophet, pox-infested heathen lands of html-forms, placing these wonders where they belong, deep in unix heartland, as god loving extensions to the shell.

        Wowow, glad to know I can still search freshmeat from the command line!

        More seriously, I wonder how well it interacts with Google these days.

        edit: oh, well. I tried installing it from each of Nix and Homebrew, and it fails to start with:

        surfraw ERROR: couldn't find global config in /nix/store/bjwd6hv3pym3bxhh9drxs0m5a38zrnj7-surfraw-2.3.0/etc/xdg/surfraw/conf or $XDG_CONFIG_DIRS
        

        or

        surfraw ERROR: couldn't find global config in /opt/homebrew/etc/xdg/surfraw/conf or $XDG_CONFIG_DIRS
        

        even though both of those files do exist! ¯\_(ツ)_/¯

        I think it’s because it doesn’t like my XDG_CONFIG_DIRS, so I try XDG_CONFIG_DIRS= surfraw google debian ports:

        /opt/homebrew/bin/surfraw: line 488: https://www.google.com/search?q=debian%20ports&num=30: No such file or directory
        

        O..kay. How about the Nix version again?

        /nix/store/bjwd6hv3pym3bxhh9drxs0m5a38zrnj7-surfraw-2.3.0/bin/surfraw: line 488: https://www.google.com/search?q=debian%20ports&num=30: No such file or directory
        

        Hrm. I’m sure I’m missing something. At any rate, I remember enjoying using this back in the early 2000’s!

        1. 2

          I just tried your query on surfraw on Fedora 40 from the repos, and it works for me.

          Looking at the code, on line 488:

          	if ok SURFRAW_graphical_remote && test $mode = graphical; then
          # ...
          		if test $SURFRAW_browser_args = "none"; then
          				$SURFRAW_browser "$@"   # HERE <--
          		else
          			$SURFRAW_browser $SURFRAW_browser_args "$@"
          		 fi
          
          

          You might try to set the BROWSER environment variable as a workaround.