[Surfraw-devel] bbcnews elvi patch

Sumant Oemrawsingh soemraws at xs4all.nl
Mon Jan 25 22:20:59 UTC 2010


Hi,

I noticed that when using the bbcnews elvi without arguments, it goes to a 404
page. Here's a diff for the trivial fix.

Note that the old version apparently also visited a different URL depending on
the -scope option. I found, however, that they probably get your "scope" from
your IP or so, and visiting a different URL depending on the scope just
forwards you to the URL that fits your IP. So, I removed the meaning of -scope
for use without arguments.

With arguments (i.e. the actual search) the elvi still uses the -scope
argument, but it doesn't seem to do much by ways of results. Nevertheless, I
didn't touch it, since I never use the -scope option anyway.

Anyway, here's the diff.

-Sumant


-- 
Sumant Oemrawsingh
-------------- next part --------------
diff --git a/elvi/bbcnews b/elvi/bbcnews
index 61ab366..3a0bb07 100755
--- a/elvi/bbcnews
+++ b/elvi/bbcnews
@@ -41,11 +41,12 @@ w3_config
 w3_parse_args "$@"
 # w3_args now contains a list of arguments
 if test -z "$w3_args"; then
-	if [ $SURFRAW_bbcnews_scope = uk ]; then
-		w3_browse_url "http://news.bbc.co.uk/1/hi.html"
-	else
-		w3_browse_url "http://news.bbc.co.uk/2/hi.html"
-	fi
+#	if [ $SURFRAW_bbcnews_scope = uk ]; then
+#		w3_browse_url "http://news.bbc.co.uk/1/hi.html"
+#	else
+#		w3_browse_url "http://news.bbc.co.uk/2/hi.html"
+#	fi
+	w3_browse_url "http://news.bbc.co.uk/"
 else
     escaped_args=`w3_url_of_arg $w3_args`
 	if [ $SURFRAW_bbcnews_scope = uk ]; then


More information about the Surfraw-devel mailing list