HtmlExtractor

net.ruippeixotog.scalascraper.scraper.HtmlExtractor
See theHtmlExtractor companion object
trait HtmlExtractor[-E <: Element, +A] extends (ElementQuery[E]) => A

An object able to extract content from net.ruippeixotog.scalascraper.model.ElementQuery instances.

Type parameters

A

the type of the extracted content

E

the type of the elements needed by this HtmlExtractor

Attributes

Companion
object
Graph
Supertypes
trait (ElementQuery[E]) => A
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def extract(q: ElementQuery[E]): A

Extracts content from an ElementQuery.

Extracts content from an ElementQuery.

Value parameters

q

the element query from which content is to be extracted

Attributes

Returns

the extracted content.

Concrete methods

final def apply(q: ElementQuery[E]): A
def map[B](f: A => B): HtmlExtractor[E, B]

Maps a function over the extracted content of this extractor.

Maps a function over the extracted content of this extractor.

Type parameters

B

the output type of the function

Value parameters

f

the function to map over this extractor

Attributes

Returns

an HtmlExtractor returning the contents extracted by this extractor mapped by f.

def mapQuery(cssQuery: String): HtmlExtractor[E, A]

Applies a CSS query to ElementQuery inputs before passing them to this extractor.

Applies a CSS query to ElementQuery inputs before passing them to this extractor.

Value parameters

cssQuery

the CSS query to apply to input ElementQuery instances

Attributes

Returns

an HtmlExtractor returning the contents extracted by this extractor after cssQuery is applied to the input queries.

Inherited methods

def andThen[A](g: A => A): ElementQuery[E] => A

Attributes

Inherited from:
Function1
def compose[A](g: A => ElementQuery[E]): A => A

Attributes

Inherited from:
Function1
override def toString(): String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Function1 -> Any
Inherited from:
Function1