Skip to content

Instantly share code, notes, and snippets.

@tenderlove
Created October 7, 2011 22:44
Show Gist options
  • Save tenderlove/1271518 to your computer and use it in GitHub Desktop.
Save tenderlove/1271518 to your computer and use it in GitHub Desktop.
(use http-client)
(use html-parser)
(use sxpath)
(define yuno "http://memegenerator.net/Y-U-No/caption/166088")
(define doc (with-input-from-request yuno
'((generatorID . "2")
(imageID . "166088")
(watermarkCode . "")
(text0 . "Y U NO")
(text1 . "DO SCHEME?")
(languageCode . "en")
) html->sxml))
(define img ((sxpath "//div[@class='instance_large']/img/@src") doc))
(print (cadar img))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment