Skip to content

Instantly share code, notes, and snippets.

@weskerfoot
Created October 1, 2013 18:01
Show Gist options
  • Save weskerfoot/6782489 to your computer and use it in GitHub Desktop.
Save weskerfoot/6782489 to your computer and use it in GitHub Desktop.
download and parse web pages with racket
#! /usr/bin/racket
#lang racket
(require net/url)
(require net/uri-codec)
(require (planet neil/html-parsing:2:0))
(require (planet clements/sxml2:1:3))
(define (get-http process)
(compose
process
html->xexp
port->string
get-pure-port
string->url))
(provide (all-defined-out))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment