egao1980 / cl-sitemaps

sitemap.xml parser for Common Lisp
MIT License
0 stars 1 forks source link
common-lisp scraping

cl-sitemaps - Sitemap.xml reader

Usage

(ql:quickload '(:dexador :cl-sitemaps))

(cl-sitemaps:parse-sitemap-xml (dex:get "http://bbc.co.uk/sitemap.xml"))
;; (#<CL-SITEMAPS:SITEMAP-REF {1003395543}>)
;; CL-SITEMAPS::|sitemap|

(cl-sitemaps:loc (car (cl-sitemaps:parse-sitemap-xml (dex:get "http://bbc.co.uk/sitemap.xml"))))
;; "https://www.bbc.co.uk/news/localnews/locations/sitemap.xml"

(defparameter *sitemap-url* (cl-sitemaps:loc (car (cl-sitemaps:parse-sitemap-xml (dex:get "http://bbc.co.uk/sitemap.xml")))))
;; *SITEMAP-URL*

(cl-sitemaps:parse-sitemap-xml (dex:get *sitemap-url*))
;; (...
;; #<CL-SITEMAPS:SITEMAP-URL {10039C92D3}> ...)
;; CL-SITEMAPS::|url|

Installation

(ql:quickload :cl-sitemaps)

Author

Copyright

Copyright (c) 2020 Nikolai Matiushev (nikolai.matiushev@egao.co.uk)

License

Licensed under the MIT License.