summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJagw <jagw@jagw.co.uk>2010-11-01 11:53:09 +0000
committerJagw <jagw@jagw.co.uk>2010-11-01 11:53:09 +0000
commit51f2a446d7c18791145638bb6c10cd47c0d17016 (patch)
treee5f3effaaa7e4f34962271e590610b1123ed380b
parente9c817ca288dcacf49c5bcead9a19d0ed8b3c127 (diff)
Support for long search terms
-rw-r--r--blasearch.classbin1855 -> 1938 bytes
-rw-r--r--blasearch.java11
2 files changed, 10 insertions, 1 deletions
diff --git a/blasearch.class b/blasearch.class
index bbed588..22431b8 100644
--- a/blasearch.class
+++ b/blasearch.class
Binary files differ
diff --git a/blasearch.java b/blasearch.java
index 63f36fc..25ac68e 100644
--- a/blasearch.java
+++ b/blasearch.java
@@ -30,7 +30,16 @@ public class blasearch {
public static void main(String[] args) throws IOException
{
- String query = args[0];
+ String query = "";
+
+ // Incorporate all args in search
+ for(int i=0; i<args.length; i++){
+ query = query + args[i] + "+";
+ }
+ // Remove trailing +
+ query = query.substring(0, query.length()-1);
+
+ System.out.println(query);
String[] parts = null;
//URL which provides XML response
URL url = new URL("http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q="+ query);