Webrexp-1.1.2: Regexp-like engine to scrap web data

Safe HaskellNone

Text.Webrexp.ResourcePath

Description

Module implementing plumbing to get a unified path locator, handling URI & local path. Implement the GraphPath and GraphWalker typeclass with HxtNode

Synopsis

Documentation

data ResourcePath Source

Main data type

Constructors

Local FilePath

Represent a file stored on the hard-drive of this machine.

Remote URI

Represent a ressource spread on internet.

rezPathToString :: ResourcePath -> StringSource

Given a ressource, transforme it to a string representation. This function should be used instead of the Show instance, which is aimed at debugging only.

downloadBinary :: (Monad m, IOMockable m) => Loggers m -> URI -> m (URI, Response ByteString)Source

Helper function to grab a resource on internet and returning it's binary representation, and it's real place if any.

rawLoadData :: (Monad m, IOMockable m) => Loggers m -> ResourcePath -> m (Maybe ByteString)Source

Extract a blob of data from a resourcepath and return the result.