PolyHtmlExtractor

net.ruippeixotog.scalascraper.scraper.PolyHtmlExtractor
See thePolyHtmlExtractor companion object

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.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

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

Attributes

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

Attributes

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

Attributes

Returns

the extracted content.

Concrete methods

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

Attributes

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

Attributes

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

Attributes

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

Attributes

Returns

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

Inherited methods

def andThen[A](g: A => A): T1 => A
Implicitly added by polyHtmlExtractorAsExtractor

Attributes

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

Attributes

Inherited from:
Function1