Last active
October 28, 2021 19:58
-
-
Save duanebester/49c43a6228efebfe407090e6a6d2fdcd to your computer and use it in GitHub Desktop.
Web Scraping w/ Clojure adding product links to cache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(clear-site "bellroy") ;; Clear cache first | |
(find-products "bellroy" "https://bellroy.com/sitemap.xml" product->cache) | |
(get-count "bellroy") | |
;; => 158 | |
;; Popping product links example: | |
(cache->product "bellroy") | |
;; => {:loc "https://bellroy.com/products/pod-jacket", ...} | |
(cache->product "bellroy") | |
;; => {:loc "https://bellroy.com/products/phone-case-3-card/leather_iphone_se", ...} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment