Menu

#5 Patch for TryIt to accept URLs from command line.

open
nobody
None
5
2004-09-07
2004-09-07
No

steve@davidson:~/projects/Crawlers/JOBO> cvs -z9 diff
-bB -u src/TryIt.java
Index: src/TryIt.java
===================================================================
RCS file: /cvsroot/jobo/JOBO/src/TryIt.java,v
retrieving revision 1.19
diff -b -B -u -r1.19 TryIt.java
--- src/TryIt.java 6 Sep 2002 13:03:51 -0000
1.19
+++ src/TryIt.java 7 Sep 2004 16:16:04 -0000
@@ -38,10 +38,16 @@
BasicConfigurator.configure();

HttpTool tool = new HttpTool();
- HttpDoc doc = tool.retrieveDocument(new
URL("http://www.matuschek.net"),
+ String url;
+ if (args.length > 0) {
+ url = args[0];
+ } else {
+ url = "http://www.matuschek.net";
+ }
+ HttpDoc doc = tool.retrieveDocument(new URL(url),

HttpConstants.GET,null);

Discussion


Log in to post a comment.