Browse files

updated readme with textile

  • Loading branch information...
1 parent 646a6c2 commit eaf16befcff34af0a16e37efbadddded6756e97a @heyZeus committed Mar 6, 2009
Showing with 8 additions and 8 deletions.
  1. +8 −8 README → README.textile
@@ -1,8 +1,8 @@
-clj-web-crawler allows you to easily crawl and scrape the web from the comfort of
+<b>clj-web-crawler</b> allows you to easily crawl and scrape the web from the comfort of
your own computer. This Clojure script is a wrapper around the Apache
commons-client Java library.
+h2. Usage
; Prints the HTML of the website
(let [clj-ws (client "")
home (method "/")]
@@ -13,21 +13,21 @@ USAGE
; send-method. In this example you are posting the login form and need
; to make sure a cookie is set to validate the login was successful.
(let [site (client "")
- login (method "/accounts/login" :post {:login "mr_cool" :password "clojurerox"})]
+ login (method "/accounts/login" :post {:login "doctor_no" :password "clojurerox"})]
(send-method site login)
(if (assert-cookie-names site "username")
(println "yeah, I'm in")
- (println "i can't remember my password again!")))
+ (println "I can't remember my password again!")))
; You can also pass in a body to the send-method macro to do something
; like check the response status code. Note you can't check the response
; code outside of the send-method call since all associated resources have
; been released.
(let [clj-ws (client "")
- login (method "/")]
- (send-method clj-ws login
- (println (.getStatusCode login))))
+ home (method "/")]
+ (send-method clj-ws home
+ (println (.getStatusCode home))))
I've only implemented some basic functionality to make the commons-client
@@ -41,7 +41,7 @@ an implementation of org.apache.commons.httpclient.HttpMethodBase. Please
see the commons-client API docs for reference.
+h2. Requirements
- clojure-contrib
- Apache commons-client 3.1 and its dependencies (only tested with the 3.1 version)

0 comments on commit eaf16be

Please sign in to comment.