diff options
author | Jagw <jagw@jagw.co.uk> | 2010-11-01 11:53:09 +0000 |
---|---|---|
committer | Jagw <jagw@jagw.co.uk> | 2010-11-01 11:53:09 +0000 |
commit | 51f2a446d7c18791145638bb6c10cd47c0d17016 (patch) | |
tree | e5f3effaaa7e4f34962271e590610b1123ed380b | |
parent | e9c817ca288dcacf49c5bcead9a19d0ed8b3c127 (diff) |
Support for long search terms
-rw-r--r-- | blasearch.class | bin | 1855 -> 1938 bytes | |||
-rw-r--r-- | blasearch.java | 11 |
2 files changed, 10 insertions, 1 deletions
diff --git a/blasearch.class b/blasearch.class Binary files differindex bbed588..22431b8 100644 --- a/blasearch.class +++ b/blasearch.class 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); |