fork download
  1. import Data.Maybe
  2. import Network.Browser
  3. import Network.HTTP
  4. import Network.URI
  5. import System.IO
  6. import qualified Data.ByteString.Char8 as B
  7.  
  8. main = do s <- fmap ((!! 418) . B.lines . rspBody) $ f "http://t...content-available-to-author-only...h.net/tech/dat/1357191974.dat"; s `seq` return ()
  9. f :: String -> IO (Response B.ByteString)
  10. f url =
  11. fmap snd $ browse $ do
  12. setUserAgent "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)"
  13. setAllowRedirects True
  14. setOutHandler (const (return ()))
  15. setErrHandler (const (return ()))
  16. request $ mkRequest GET
  17. $ fromMaybe (error $ "getRequest: Not a valid URL - " ++ url) $ parseURI url
  18.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.hs:4:8:
    Could not find module `Network.URI'
    Use -v to see a list of the files searched for.
stdout
Standard output is empty