Skip to content

Instantly share code, notes, and snippets.

@tatac1
Created February 15, 2014 08:39
Show Gist options
  • Save tatac1/9016280 to your computer and use it in GitHub Desktop.
Save tatac1/9016280 to your computer and use it in GitHub Desktop.
tagstream and http-conduit combination
{-# LANGUAGE OverloadedStrings #-}
import qualified Data.Conduit.Binary as CB
import qualified Data.Conduit.List as CL
import qualified Text.HTML.TagStream.ByteString as TS
import Data.Conduit
import Network.HTTP.Conduit
main :: IO ()
main = do
res <- simpleHttp "http://vul.jp/"
CB.sourceLbs res $= TS.tokenStream $$ CL.mapM_ print
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment