Skip to content

Instantly share code, notes, and snippets.

View oneness's full-sized avatar

Kasim oneness

View GitHub Profile
@oneness
oneness / gcount.clj
Created August 19, 2011 06:45
gcount
(ns gcount.core
"generates charts out of the result from google search term(s)."
(:use (incanter core charts))
(:require [clj-http.client :as http-client]))
(def *search-provider* "http://www.google.com/search?hl=en&q=")
(def *search-pattern* #"About.*?([\d,]+).*?")
(defn search-for-term [term]
(let [encoded-term (.replaceAll (apply str term) " " "+")