[Surfraw-devel] bbcnews elvi patch

James Rowe jnrowe at gmail.com
Tue Jan 26 09:27:00 UTC 2010

* Sumant Oemrawsingh (soemraws at xs4all.nl) wrote:
> I noticed that when using the bbcnews elvi without arguments, it goes to a 404
> page. Here's a diff for the trivial fix.

  I only ever use surfraw with search args ;)

> 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.

  You're right.  They used to split the main page for UK and worldwide audiences
based on URL, now they use geolocation magic[1].

> 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.

  The scope arguments values have changed but can be made to work when
searching, see [2] and [3].  Notice how "Alzheimer's" and "dementia" are used
for world and UK respectively.  (I had to try five of my co-workers's names
before I found a search with different results.)

> Anyway, here's the diff.

  Using "git send-email" or "git format-patch" would make it much quicker to
apply patches for someone with commit access.  It also makes it easier to give
you the Author attribution in log output, without having to fiddle with

  I've attached a different patch that makes use of the new search functionality
on the site.  I haven't committed it yet as I'd like to hear if people prefer
the inclusion of non-news results in the output, which is what the current elvi
is giving us despite its name.


  1. http://news.bbc.co.uk/2/hi/help/3281795.stm
  2. http://search.bbc.co.uk/search?scope=uk&tab=ns&q=michael
  3. http://search.bbc.co.uk/search?scope=all&tab=ns&q=michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-elvi-bbcnews-Fixes-for-upstream-s-search-changes.patch
Type: text/x-patch
Size: 1735 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/surfraw-devel/attachments/20100126/b00f00b3/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/surfraw-devel/attachments/20100126/b00f00b3/attachment.pgp>

More information about the Surfraw-devel mailing list