net.ruippeixotog.scalascraper.model

Members list

Type members

Classlikes

trait Document

A representation of an HTML document.

A representation of an HTML document.

This trait provides methods for retrieving the document's location and the root element, with which further queries can be made. It also has methods for quick retrieval of common information and nodes, such as the title and body of the page.

Depending on the type of net.ruippeixotog.scalascraper.browser.Browser used to load Document objects, the respective pages may or may not be dynamic. As such, there are no guarantees of whether the document's location is a constant value and that returned Element instances will be updated as the DOM nodes are updated. The documentation of each Browser implementation should be read for more information on the semantics of its Document and Element implementations.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Document

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Document.type
trait Element

A representation of a HTML DOM element.

A representation of a HTML DOM element.

Elements can be obtained by obtaining Document instances (for example, through a net.ruippeixotog.scalascraper.browser.Browser) and using one of its several methods. They provide several methods for traversing and retrieving infomation from the DOM of the page in which they are.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Element

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Element.type
case class ElementNode[E <: Element](element: E) extends Node

A Node representing a DOM element.

A Node representing a DOM element.

Value parameters

element

the DOM element

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Node
class Object
trait Matchable
class Any
Show all
trait ElementQuery[+E <: Element] extends Iterable[E]

The result of a query to an Element. It works as a collection of Element instances and provides a way to further query the elements.

The result of a query to an Element. It works as a collection of Element instances and provides a way to further query the elements.

Attributes

Companion
object
Supertypes
trait Iterable[E]
trait IterableFactoryDefaults[E, Iterable]
trait IterableOps[E, Iterable, Iterable[E]]
trait IterableOnceOps[E, Iterable, Iterable[E]]
trait IterableOnce[E]
class Object
trait Matchable
class Any
Show all
object ElementQuery

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
sealed trait Node

A representation of a HTML DOM node. Only two types of nodes are supported: element nodes (ElementNode) containing Element instances and text nodes (TextNode) containing plain text.

A representation of a HTML DOM node. Only two types of nodes are supported: element nodes (ElementNode) containing Element instances and text nodes (TextNode) containing plain text.

Most methods in scala-scraper deal with and return Element instances directly, instead of nodes. Node lists can be retrieved by using the childNodes and siblingNodes methods of an Element.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class ElementNode[E]
class TextNode
case class TextNode(content: String) extends Node

A Node representing a DOM text node.

A Node representing a DOM text node.

Value parameters

content

the text content of the node

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Node
class Object
trait Matchable
class Any
Show all