![]() |
|
![]() | ||
|
Subject:
searching list of only certain sites
Category: Computers Asked by: andy4598-ga List Price: $2.00 |
Posted:
29 Oct 2002 16:09 PST
Expires: 01 Nov 2002 01:09 PST Question ID: 92560 |
Is there a way to use Google (or another good search engine for that matter) to search only a select list of sites. I already know that you can search a single site using a domain restriction on Google - for instance if I only wanted to search cnn.com. However, I would like to use Google or another engine to search a list of only about 40 sites. Is there any way to search these 40 sites at once, excluding all other sites? | |
| |
|
![]() | ||
|
There is no answer at this time. |
![]() | ||
|
Subject:
Re: searching list of only certain sites
From: josh_pixelfresh-ga on 31 Oct 2002 12:30 PST |
No answer button for me so I guess I'll post it here... I've wanted to post something for the fun of it but I can't answer much! Anyway, paste the following into an html file and it should search Google in the context of 5 sites (which you can edit). Alternatively see it live here: http://www.pixelfresh.co.uk/searchengines/google5sites.html =========================================================== <HTML> <HEAD> <TITLE> Search selected sites on Google </TITLE> <script language="JavaScript"> function makeQuery() { var numSites = 5; // change this if you add more site fields var extraBit = ''; var fullUrl = ''; for (var i=1; i<numSites; i++) { if (eval('document.form1.site' + i + '.value').length) { if (extraBit.length) { extraBit += ' OR'; } extraBit += ' site:' + eval('document.form1.site' + i + '.value'); } } fullUrl = '://www.google.com/search?q=' + escape('"' + document.form1.q.value + '"' + ' ' + extraBit); location.href = fullUrl; } </script> </HEAD> <BODY> <form name="form1" onsubmit="makeQuery(); return false;"> <b>Sites</b><br> Site 1: <input type="text" name="site1" value="www.yahoo.com"></input><br> Site 2: <input type="text" name="site2" value="www.microsoft.com"></input><br> Site 3: <input type="text" name="site3" value="www.amazon.com"></input><br> Site 4: <input type="text" name="site4" value="www.lastminute.com"></input><br> Site 5: <input type="text" name="site5" value="www.pixelfresh.co.uk"></input><br> <br> <b>Query</b><br> <input type="text" name="q"></input> <input type="submit" value="Search"></input> </form> </BODY> </HTML> |
Subject:
Re: searching list of only certain sites
From: andy4598-ga on 01 Nov 2002 01:09 PST |
josh_pixelfresh-ga, This is fantastic, and is exactly what I was looking for. Thanks so much! andy4598-ga |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |