[Surfraw-devel] [PATCH] google: Fix images & remove obsolete search topics

Miroslav Koskar mk at mkoskar.com
Tue Apr 28 11:58:26 UTC 2015


Hello,

this patch is fixing problem with `google -i, -images`.
Along the way I've also removed mention of obsolete search topics (bsd, linux,
etc.) from the help section. I call them "obsolete" because they simply don't
work now (I don't know if they ever did myself). I've also removed "&tbo=p"
from videos since there is no functional difference. To my knowledge "tbo" was
affecting so called "Search Options side panel" which is long gone.

So that's it.
Please, consider merging.

Thanks ;)
Miro

-- 
Miroslav Koskar
http://mkoskar.com/

-- 8< --
---
 elvi/google | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/elvi/google b/elvi/google
index df180c3..33c7233 100755
--- a/elvi/google
+++ b/elvi/google
@@ -25,12 +25,8 @@ Local options:
 	  images	|	Images
 	  videos	|	Videos
 	  maps		|	Maps
-	  groups	|	groups
+	  groups	|	Groups
 	  news		|	News
-          bsd           |       BSD
-          linux         |       Linux
-          mac           |       Apple Macintosh
-          unclesam      |       U.S. Government
                                 Environment: SURFRAW_google_search
   -country=			Select regional google site
 				Default is us (google.com)
@@ -97,21 +93,21 @@ url="http://"
 if test -z "$w3_args" ; then
     case "$SURFRAW_google_search" in
 	i*) url="${url}images" ;;
+	v*) url="${url}video"  ;;
 	m*) url="${url}maps"   ;;
 	g*) url="${url}groups" ;;
 	n*) url="${url}news"   ;;
-	v*) url="${url}video"  ;;
 	*)  url="${url}www"    ;;
     esac
     url="${url}.google.${domain}"
 else
     search="$SURFRAW_google_search"
     case "$SURFRAW_google_search" in
-	v*) url="${url}www"; search="search"; extra="&tbo=p&tbm=vid";;
-	i*) url="${url}images" ; search="images";;
-	m*) url="${url}maps"   ; search=maps    ;;
-	g*) url="${url}groups" ; search=groups  ;;
-	n*) url="${url}news"   ; search=news    ;;
+	i*) url="${url}www"; search="search"; extra="&tbm=isch";;
+	v*) url="${url}www"; search="search"; extra="&tbm=vid";;
+	m*) url="${url}maps"   ; search="maps"    ;;
+	g*) url="${url}groups" ; search="groups"  ;;
+	n*) url="${url}news"   ; search="news"    ;;
 	*)  url="${url}www"    ;;
     esac
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/surfraw-devel/attachments/20150428/2810e8c8/attachment.sig>


More information about the Surfraw-devel mailing list