[Surfraw-commits] [SCM] surfraw - a fast unix command line interface to WWW branch, master, updated. surfraw_2-2-5_1-71-gabd45d5

James Rowe jnrowe at gmail.com
Mon Feb 15 11:50:51 UTC 2010


The following commit has been merged in the master branch:
commit abd45d5b78c7ae305257354e89446a06eaafb6fe
Author: James Rowe <jnrowe at gmail.com>
Date:   Mon Feb 15 11:42:21 2010 +0000

    elvi/imdb: Fixes for upstream search changes.  Thanks to Sadako.

diff --git a/ChangeLog b/ChangeLog
index 0ff3f11..d48aec2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-02-15  James Rowe  <jnrowe at gmail.com>
+
+	* elvi/imdb: Fixes for upstream search changes.  Thanks to Sadako.
+
 2010-02-14  James Rowe  <jnrowe at gmail.com>
 
 	* Added $SURFRAW_screen_args for passing arguments to the defined screen
diff --git a/elvi/imdb b/elvi/imdb
index 8256b16..6a40d0c 100755
--- a/elvi/imdb
+++ b/elvi/imdb
@@ -6,7 +6,7 @@
 . surfraw || exit 1
 
 w3_config_hook () {
-def   SURFRAW_imdb_category All
+def   SURFRAW_imdb_category all
 }
 
 w3_usage_hook () {
@@ -34,7 +34,10 @@ w3_parse_option_hook () {
     opt="$1"
     optarg="$2"
     case "$opt" in
-	-category=*) setopt   SURFRAW_imdb_category $optarg	;;
+	-category=Titles)     setopt SURFRAW_imdb_category tt      ;;
+	-category=People)     setopt SURFRAW_imdb_category nm      ;;
+	-category=Characters) setopt SURFRAW_imdb_category ch      ;;
+	-category=*)          setopt SURFRAW_imdb_category $optarg ;;
 	*) return 1 ;;
     esac
     return 0
@@ -51,5 +54,5 @@ else
 	if [ $SURFRAW_imdb_category = MyMovies ]; then
 		SURFRAW_imdb_category="My+Movies"
 	fi
-    w3_browse_url "http://www.imdb.com/Find?select=${SURFRAW_imdb_category}&for=${escaped_args}"
+    w3_browse_url "http://www.imdb.com/find?s=${SURFRAW_imdb_category}&q=${escaped_args}"
 fi
diff --git a/test/imdb.test b/test/imdb.test
index da39b79..881f250 100644
--- a/test/imdb.test
+++ b/test/imdb.test
@@ -1,2 +1,8 @@
 imdb Ralph Bates
 12 February.*1940
+imdb -category=Titles As Good as It Gets
+As Good as It Gets.*1997
+imdb -category=People Jet Li
+Beijing, China
+imdb -category=Characters Ralph Wiggum
+son of Clancy and Sarah Wiggum

-- 
surfraw -  a fast unix command line interface to WWW



More information about the Surfraw-commits mailing list