DEV Community

taroyanaka
taroyanaka

Posted on

3 1

Begginnig Common Lisp for web scraping

hey nerds, do you like web? interest lisp?
no?
i dont care
okay i do

Step1: install sbcl
$ brew update
$ brew install sbcl
(now, clisp is stopped update)

Step2: install quick lisp
$ curl -O http://beta.quicklisp.org/quicklisp.lisp
$ sbcl --load quicklisp.lisp

----------↓↓↓starting sbcl console↓↓↓-----

(quicklisp-quickstart:install)
(ql:add-to-init-file)

Step3: install libraries to sbcl by quicklisp
(ql:quickload :drakma)
(ql:quickload :plump)
(ql:quickload :clss)

Step4: drink a coffee

Step5: write codes and eval
(defvar html (drakma:http-request "http://www.paulgraham.com/hp.html"))
(defvar parse-html (plump:parse html))
(plump:text (car (coerce (clss:select "title" parse-html) 'list)))

Top comments (1)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay