Library
Module
Module type
Parameter
Class
Class type
Page
This module contains all the functions used to analyze a page, select specific elements, and manage forms.
Make a new page from a base URI and a Lambdasoup document
Return the resolver of page, that take relative URIs to absolute ones using the page base URI
Lambdasoup provides lazy sequences to traverse only needed part of an HTML document when used in combination with with_stop
. We provide a wrapper that is compatible with Mechaml types such as forms, images, inputs, etc.
Soup.stop
type
Operations on lazy sequences
val iter : ('a -> unit) -> 'a seq -> unit
val fold : ('a -> 'b -> 'a) -> 'a -> 'b seq -> 'a
val first : 'a seq -> 'a option
val nth : int -> 'a seq -> 'a option
val find_first : ('a -> bool) -> 'a seq -> 'a option
val to_list : 'a seq -> 'a list
val with_stop : ('a stop -> 'a) -> 'a
see Lambdasoup's Soup.with_stop
module Form : sig ... end
Operations on forms and inputs
module Link : sig ... end
Operations on hypertext links
module Image : sig ... end
Operations on images
All the following function are built using the same pattern.
forms
) return all the elements of a certain type as a lazy sequence. For example, forms mypage
will return all the forms in the pageNone
if there isn't any. Eg, link_with
"[href$=.jpg]" mypage
will try to find a link that point to a JPEG image