shpider-0.0.2: Web automation library in Haskell.Source codeContentsIndex
Network.Shpider.State
Description
This module describes the state of shpider computations, and provides a monad transformer over it.
Synopsis
module Control.Monad.State
data ShpiderState = SS {
htmlOnlyDownloads :: Bool
startPage :: String
dontLeaveDomain :: Bool
curlOpts :: [CurlOption]
currentPage :: Page
visited :: Maybe [String]
}
data Page = Page {
links :: [Link]
forms :: [Form]
tags :: [Tag]
source :: String
addr :: String
}
type Shpider = StateT ShpiderState IO
emptyPage :: Page
runShpider :: Shpider a -> IO a
runShpiderSt :: Shpider a -> IO (a, ShpiderState)
Documentation
module Control.Monad.State
data ShpiderState Source
The shpider state holds all the options for shpider transactions, the current page and all the CurlOptions used when calling curl.
Constructors
SS
htmlOnlyDownloads :: Bool
startPage :: String
dontLeaveDomain :: Bool
curlOpts :: [CurlOption]
currentPage :: Page
visited :: Maybe [String]
show/hide Instances
data Page Source
The Page datatype. Holds Links, Forms, the parsed [ Tag ], the page source, and the page's absolute URL.
Constructors
Page
links :: [Link]
forms :: [Form]
tags :: [Tag]
source :: String
addr :: String
show/hide Instances
type Shpider = StateT ShpiderState IOSource
The type of Shpider computations. A state transformer over ShpiderState and IO.
emptyPage :: PageSource
An empty page, containing no information.
runShpider :: Shpider a -> IO aSource
Run a Shpider computation, returning the result.
runShpiderSt :: Shpider a -> IO (a, ShpiderState)Source
Run a Shpider computation, returning the result with the state.
Produced by Haddock version 2.4.2