       (println print-friendly)))
 
   (with-redefs [data-to-flows dtf]
-    (let [service (WebSource. "http://www.google.com" 50 (atom nil) (atom nil))]
+    (let [service (WebSource. "http://www.google.com" 50 true (atom nil) (atom nil))]
       (.start service)
       (Thread/sleep 30000) ;stay within this context (so that dtf function is used)
       (.stop service)))

  (let [event (generate-event root-url url body)]
    (events-to-flows (vector event))))

(defn create-crawler [root-url url-limit]
  (spider/crawl {:url root-url
                 :handler (fn [{:keys [url body]}] (crawler-fn root-url url body))
                 :workers 3
                 :url-limit url-limit
                 :url-extractor spider/extract-all


(defrecord WebSource [^String root-url
                      ^Integer  url-limit
                      remove-html-tags
                      crawler
                      running]

