Hello all <div>I am trying to write a Haskell program which download html pages from wikipedia including images and convert them into pdf . I wrote a small script </div><div><div><br></div><div>import Network.HTTP</div><div>
import Data.Maybe</div><div>import Data.List</div><div><br></div><div>main = do </div><div> x <- getLine </div><div> htmlpage <- getResponseBody =<< simpleHTTP ( getRequest x ) --open url</div><div>
--print.words $ htmlpage </div><div> let ind_1 = fromJust . ( \n -> findIndex ( n `isPrefixOf`) . tails $ htmlpage ) $ "<!-- content -->"</div><div> ind_2 = fromJust . ( \n -> findIndex ( n `isPrefixOf`) . tails $ htmlpage ) $ "<!-- /content -->"</div>
<div> tmphtml = drop ind_1 $ take ind_2 htmlpage</div><div> writeFile "down.html" tmphtml</div><div> </div></div><div>and its working fine except some symbols are not rendering as it should be. Could some one please suggest me how to accomplish this task. </div>
<div><br></div><div>Thank you</div><div>Mukesh Tiwari</div>