Skip to content

Instantly share code, notes, and snippets.

@lov3catch
Created August 13, 2022 14:27
Show Gist options
  • Save lov3catch/52b29d6fc164fb92468baedd670de261 to your computer and use it in GitHub Desktop.
Save lov3catch/52b29d6fc164fb92468baedd670de261 to your computer and use it in GitHub Desktop.
Racket (Parse html)
#lang racket/base
(require html-parsing
net/url
sxml/sxpath)
(define bashorg (html->xexp
(get-pure-port (string->url "http://bashorg.org"))))
((sxpath "//*[@id='quotes']/div[1]/div[2]") bashorg)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment