shpider-0.2.1.1: Web automation library in Haskell.

Network.Shpider.URL

Synopsis

Documentation

isSameDomain :: String -> String -> BoolSource

is the second url on the same domain as the first? Note: this will return False if either URL is invalid.

mkAbsoluteUrl :: String -> Shpider (Maybe String)Source

Assumes the given URL is relative to currentPage.

isAbsoluteUrl :: String -> BoolSource

True if the url is absolute

isMailto :: String -> BoolSource

is the given string of form "mailto:person.com"?

isHttp :: String -> BoolSource

is the url a http url?

getDomain :: String -> StringSource

Get the protocol and domain from a URL eg

    getDomain "widdle://owqueer.co.uk/strangeanticsofsailors/jimmy"
    -- "widdle://owqueer.co.uk"

getFolder :: String -> StringSource

Get the whole url up to and including the current folder of the present document.

  
    getFolder "widdle://owqueer.co.uk/strangeanticsofsailors/jimmy"
    -- "widdle://owqueer.co.uk/strangeanticsofsailors/"