New scraping routines

This commit is contained in:
windlejacob12 2022-09-03 20:27:28 -04:00
parent 200fb961b9
commit 68f5cce136

View File

@ -1,6 +1,27 @@
(ns com-jakewindle-git.scraper
(:require [clj-http.client :as client]))
(:gen-class)
(:require [clj-http.client :as client]
[hickory.core :as hick]))
;; Models
;; Page
(defn page [html]
{:html html :parsed nil})
(defn get-src [uri]
(:body (client/get uri)))
(defn parse-src [src]
(hick/parse src))
(defn new-page [uri]
(-> uri
(get-src)
(parse-src)
(page)))
;; Entities
(defn greet
"Callable entry point to the application."
[data]