PolyHtmlExtractor

An extractor like HtmlExtractor but whose extracted content type depends on the type of the input net.ruippeixotog.scalascraper.model.Element s. A PolyHtmlExtractor supports application of CSS queries and can be turned into a normal HtmlExtractor by calling its apply[E] method, fixing the type of the input Element as E.

Companion:
object
class Object
trait Matchable
class Any

Type members

Types

type Out[E <: Element]

The type of the extracted content as a function of the input elements.

The type of the extracted content as a function of the input elements.

Type parameters:
E

the type of the input elements

Value members

Abstract methods

def apply[E <: Element]: HtmlExtractor[E, Out[E]]

Returns an HtmlExtractor obtained from this extractor by specifying the type of the input elements.

Returns an HtmlExtractor obtained from this extractor by specifying the type of the input elements.

Type parameters:
E

the type of the input elements

Returns:

an HtmlExtractor obtained from this extractor by specifying the type of the input elements.

def extract(q: ElementQuery[E]): A
Implicitly added by polyHtmlExtractorAsExtractor

Extracts content from an ElementQuery.

Extracts content from an ElementQuery.

Value parameters:
q

the element query from which content is to be extracted

Returns:

the extracted content.

Concrete methods

@inline
final def apply(q: ElementQuery[E]): A
Implicitly added by polyHtmlExtractorAsExtractor
def apply(cssQuery: String): Aux[Out]

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

Returns:

a PolyHtmlExtractor returning the contents extracted by this extractor after cssQuery is applied to the input queries.

def map[B](f: A => B): HtmlExtractor[E, B]
Implicitly added by polyHtmlExtractorAsExtractor

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

Returns:

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

def mapQuery(cssQuery: String): HtmlExtractor[E, A]
Implicitly added by polyHtmlExtractorAsExtractor

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

Returns:

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

def mapQuery(cssQuery: String): Aux[Out]

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

Returns:

a PolyHtmlExtractor returning the contents extracted by this extractor after cssQuery is applied to the input queries.

Inherited methods

@unspecialized
def andThen[A](g: A => A): ElementQuery[E] => A
Implicitly added by polyHtmlExtractorAsExtractor
Inherited from:
Function1
@unspecialized
def compose[A](g: A => ElementQuery[E]): A => A
Implicitly added by polyHtmlExtractorAsExtractor
Inherited from:
Function1