shpider-0.2: Web automation library in Haskell.

Network.Shpider.State

Description

This module describes the state of shpider computations, and provides a monad transformer over it.

Synopsis

Documentation

data ShpiderState Source

The shpider state holds all the options for shpider transactions, the current page and all the CurlOptions used when calling curl.

Instances

data Page Source

The Page datatype. Holds Links, Forms, the parsed [ Tag ], the page source, and the page's absolute URL.

Constructors

Page 

Fields

links :: [Link]
 
forms :: [Form]
 
tags :: [Tag String]
 
source :: String
 
addr :: String
 

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.