-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-- HTML
-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
getContenidoURL :: String -> IO (String, String)
getContenidoURL url
    = do (CurlResponse cCode _ _ _ content fvalue) <- getResponse url
         putStrLn $ show cCode ++ " at " ++ url
         (IString eurl) <- fvalue EffectiveUrl
         if cCode == CurlOK
          then do let base = URL.getBaseUrl eurl
                  forkIO (downloadImages base content)
                  forkIO (downloadHTMLStyleSheet base content)
                  forkIO (downloadXMLStyleSheet base content)
                  return (eurl,content)
          else return $ (url,pageNoDisponible (show cCode) url)
getContenidoURL :: String -> IO (String, String)
getContenidoURL url
    = do (CurlResponse cCode _ _ _ content fvalue) <- getResponse url
         putStrLn $ show cCode ++ " at " ++ url
         (IString eurl) <- fvalue EffectiveUrl
         if cCode == CurlOK
          then do let base = URL.getBaseUrl eurl
                  forkIO (downloadImages base content)
                  forkIO (downloadHTMLStyleSheet base content)
                  forkIO (downloadXMLStyleSheet base content)
                  return (eurl,content)
          else return $ (url,pageNoDisponible (show cCode) url)
getContenidoURL url
    = do (CurlResponse cCode _ _ _ content fvalue) <- getResponse url
         putStrLn $ show cCode ++ " at " ++ url
         (IString eurl) <- fvalue EffectiveUrl
         if cCode == CurlOK
          then do let base = URL.getBaseUrl eurl
                  forkIO (downloadImages base content)
                  forkIO (downloadHTMLStyleSheet base content)
                  forkIO (downloadXMLStyleSheet base content)
                  return (eurl,content)
          else return $ (url,pageNoDisponible (show cCode) url)