support for parameters on actions.
[utils] / crawler / basic / src / org / wamblee / crawler / impl / App.java
index 90e66dfcca3e6a69f55d04dc088dd22a78347fb2..b0339f4b07ad7d37b765a7e0c79beda0ef5a0cae 100644 (file)
@@ -5,14 +5,14 @@ import java.io.FileInputStream;
 import java.io.InputStream;
 
 import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.commons.httpclient.NameValuePair;
 import org.dom4j.Element;
 import org.wamblee.crawler.Action;
 import org.wamblee.crawler.Configuration;
 import org.wamblee.crawler.Crawler;
 import org.wamblee.crawler.Page;
 import org.wamblee.crawler.PageException;
+import org.wamblee.xml.XslTransformer;
 
 /*
  * Copyright 2005 the original author or authors.
@@ -31,7 +31,7 @@ import org.wamblee.crawler.PageException;
  */
 
 /**
- * Entry point for the crawler.
+ * Test application which uses the crawler. 
  */
 public final class App {
 
@@ -56,7 +56,7 @@ public final class App {
         String configFileName = aArgs[0];
         String starturl = aArgs[1];
 
-        ConfigurationParser parser = new ConfigurationParser();
+        ConfigurationParser parser = new ConfigurationParser(new XslTransformer());
         InputStream configFile = new FileInputStream(new File(configFileName));
         Configuration config = parser.parse(configFile);
 
@@ -66,7 +66,7 @@ public final class App {
         Crawler crawler = new CrawlerImpl(client, config);
 
         System.out.println("Retrieving: " + starturl);
-        Page page = crawler.getPage(starturl);
+        Page page = crawler.getPage(starturl, new NameValuePair[0]);
         showPage(page);
         page = page.getAction("channels-favorites").execute();
         recordInterestingShows(page);