[Haskell-cafe] Downloading web page in Haskell
michael at snoyman.com
Sat Nov 20 15:15:23 EST 2010
2010/11/20 José Romildo Malaquias <j.romildo at gmail.com>:
> In order to download a given web page, I wrote the attached program. The
> problem is that the page is not being full downloaded. It is being
> somehow intettupted.
> Any clues on how to solve this problem?
My guess is that there's a character encoding issue. Another approach
would be using the http-enumerator package. The equivalent program
module Main where
import Network.HTTP.Enumerator (simpleHttp)
import qualified Data.ByteString.Lazy as L
do src <- simpleHttp
L.writeFile "test.html" src
More information about the Haskell-Cafe