Looking for a multi-site searching template
July 7, 2009 10:36 PM   Subscribe

I want to find a fairly easy-to-adapt template from which to do multiple site searching with a single term. My technical abilities are, let's say, modest.

I sometimes need to search multiple art gallery/library/museum sites with the same term. I have a folder of about 20 links to the search pages for most of the major repositories - like NYPL, the Louvre, Met Museum, British Museum etc etc - and I normally go through each of them sequentially, when I need to do a blanket search, which is kind of time consuming.

I'm wondering if it's feasible to set up a *simple* html page locally that has a search box from which a single term can be searched from all these sites simultaneously and the extracted images/info compiled into a single results page? {It may be that this is best split between a couple/few html files so I'm not potentially loading 2000 images from 100 results each from the 20 repositories. Trial and error on this I s'pose.}

I have dorked around a bit with blogger templates and css and am moderately familiar with most markup. I haven't built anything really from scratch and I could probably recognise a few coding languages on a good day; but I certainly couldn't apply or modify them without help/copying. With that in mind, I would be happy to receive any tips or advice as to how this might be done (and indeed please tell me if it sounds a bit beyond my limited-ish capabilities).

I presume that a suitable template will be easy to find and copy, yeah?? And the adapting of it: will that be fairly reasonable?? We are not talking pretty: I just want something functional. {I guess one of the important issues will be identifying and compiling the correct search strings for each site hmm?}
posted by peacay to Computers & Internet (3 answers total) 1 user marked this as a favorite
 
Hrm. I think this may be a little beyond you, yeah. The hard part isn't actually querying so much as extracting the results from the page and then sticking them into a template on the results page. If you happen to be using a pre-Leopard mac, you could look into Sherlock -- I've never used it myself but my understanding is it supports customizable metasearch that you could configure to search these pages.

What you may be able to get, as a half measure, is a form where you type in the search term once and it does the search on each site and opens each results page up in a separate window. So you'd still have to page through 20 pages but at least you wouldn't have to do the search manually. You could probably write this yourself with some javascript*, or there are existing sites that'll help you out with this kind of thing, like agent55.

*I would strongly suggest looking at existing sites to see if they do what you want, because it'll be easier. But if not, you'll probably want javascript like

function openWindows(term) {
var urls = [
'http://www.google.com/search?q=##QUERY##',
'http://www.bing.com/search?q=##QUERY##&go=&form=QBLH'
];
for (var i = 0; i < urls.length; i++) {
var url = urls[i].replace("##QUERY##", escape(term));
window.open(url, '', 'width=200,height=300,copyhistory=no');
}
}

with html like

<form action="">
<input name="search" value="" id="search">
<input type="button" value="BUTTON"
onclick="openWindows(document.getElementById('search').value)">
</form>
posted by inkyz at 11:53 PM on July 7, 2009


Thanks inkyz!

There is no solution to a problem that cannot be rendered inoperable with the addition of sufficient naivete and ignorance on the approach side.

I have been playing around with agent55 a bit and I suspect it will be able to handle about half of the desired sites (the rest have probably insurmountable complexity in their search machinations). That alone is a great advancement over the present circumstances and will happily do unless somebody else comes along with a trumping suggestion.
posted by peacay at 1:13 AM on July 8, 2009


You could also try Rollyo's service.

As for hand coding, like inkyz said, if the issue is that the databases of the sites in question are too "closed" to be indexed by outside search engines, then you're not going to find an easy solution to "unclose" them and place their results on a page of your own devising.

I can offer some slightly simpler javascript if you just want to build some bookmarklets to kick a search into action without loading the site's Search page first. It's not unlike what inkyz wrote, but super stripped down so you can just paste it into the Location of a bookmark in your browser:

javascript:void(q=prompt('Enter%20text%20to%20search%20using%20Google.',''));if(q)void(location.href='http://www.google.com/search?client=googlet&q='+escape(q))

The %20 means "show a space here" in the dialog box that pops up. The 'http://www.google.com/search?client=googlet&q=' part is the piece of the URL that's always the same when you search, and then the stuff you type in will appear right after it. Maybe it will be helpful for you.
posted by bcwinters at 4:13 AM on July 8, 2009


« Older Any clue what old science film this is?   |   UU Newer »
This thread is closed to new comments.