Add header
This commit is contained in:
parent
28dac9ad47
commit
d817ed334a
@ -6,6 +6,8 @@
|
|||||||
[clojure.java.shell :as shell]
|
[clojure.java.shell :as shell]
|
||||||
) (:gen-class))
|
) (:gen-class))
|
||||||
|
|
||||||
|
(def h {"User-Agent" "Mozilla/5.0 (Windows NT 6.1;) Gecko/20100101 Firefox/13.0.1"})
|
||||||
|
|
||||||
(defn read-csv-domains
|
(defn read-csv-domains
|
||||||
"Read CSV file with all domains"
|
"Read CSV file with all domains"
|
||||||
[url]
|
[url]
|
||||||
@ -16,7 +18,7 @@
|
|||||||
"Check if a web page is generated with WordPress"
|
"Check if a web page is generated with WordPress"
|
||||||
[url]
|
[url]
|
||||||
(try
|
(try
|
||||||
(let [response (client/get (str "http://" url "/") {:ignore-unknown-host? true, :connection-timeout 5000, :throw-exceptions false})]
|
(let [response (client/get (str "http://" url "/") {:headers h :ignore-unknown-host? true, :connection-timeout 5000, :throw-exceptions false})]
|
||||||
(every? identity [(re-find (re-pattern "meta.*generator.*WordPress") (:body response))]))
|
(every? identity [(re-find (re-pattern "meta.*generator.*WordPress") (:body response))]))
|
||||||
(catch Exception e
|
(catch Exception e
|
||||||
"timeout"
|
"timeout"
|
||||||
|
Loading…
Reference in New Issue
Block a user