All Downloads are FREE. Search and download functionalities are using the official Maven repository.

it.skrape.selects.html5.TextSemanticsSelectors.kt Maven / Gradle / Ivy

Go to download

A Kotlin-based testing/scraping/parsing library providing the ability to analyze and extract data from HTML (server & client-side rendered). It places particular emphasis on ease of use and a high level of readability by providing an intuitive DSL. First and foremost it aims to be a testing lib, but it can also be used to scrape websites in a convenient fashion.

There is a newer version: 1.3.0-alpha.2
Show newest version
@file:Suppress("TooManyFunctions")

package it.skrape.selects.html5

import it.skrape.selects.CssSelectable
import it.skrape.selects.CssSelector

/**
 * Will define a -tags css query selector.
 * By default it will just be the specific tag-name.
 * It is possible to define a more concrete selector by using the provided fields of the CssSelector object or
 * by passing a raw css query selector as parameter.
 * If a selector is passed as parameter as well as be defined via CssSelector fields, they will be merged.
 * @see CssSelector
 * @param cssSelector
 * @return T
 */
public fun  CssSelectable.a(cssSelector: String = "", init: CssSelector.() -> T): T =
        selection("a$cssSelector", init)

/**
 * Will define a -tags css query selector.
 * By default it will just be the specific tag-name.
 * It is possible to define a more concrete selector by using the provided fields of the CssSelector object or
 * by passing a raw css query selector as parameter.
 * If a selector is passed as parameter as well as be defined via CssSelector fields, they will be merged.
 * @see CssSelector
 * @param cssSelector
 * @return T
 */
public fun  CssSelectable.abbr(cssSelector: String = "", init: CssSelector.() -> T): T =
        selection("abbr$cssSelector", init)

/**
 * Will define a -tags css query selector.
 * By default it will just be the specific tag-name.
 * It is possible to define a more concrete selector by using the provided fields of the CssSelector object or
 * by passing a raw css query selector as parameter.
 * If a selector is passed as parameter as well as be defined via CssSelector fields, they will be merged.
 * @see CssSelector
 * @param cssSelector
 * @return T
 */
public fun  CssSelectable.b(cssSelector: String = "", init: CssSelector.() -> T): T =
        selection("b$cssSelector", init)

/**
 * Will define a -tags css query selector.
 * By default it will just be the specific tag-name.
 * It is possible to define a more concrete selector by using the provided fields of the CssSelector object or
 * by passing a raw css query selector as parameter.
 * If a selector is passed as parameter as well as be defined via CssSelector fields, they will be merged.
 * @see CssSelector
 * @param cssSelector
 * @return T
 */
public fun  CssSelectable.bdi(cssSelector: String = "", init: CssSelector.() -> T): T =
        selection("bdi$cssSelector", init)

/**
 * Will define a -tags css query selector.
 * By default it will just be the specific tag-name.
 * It is possible to define a more concrete selector by using the provided fields of the CssSelector object or
 * by passing a raw css query selector as parameter.
 * If a selector is passed as parameter as well as be defined via CssSelector fields, they will be merged.
 * @see CssSelector
 * @param cssSelector
 * @return T
 */
public fun  CssSelectable.bdo(cssSelector: String = "", init: CssSelector.() -> T): T =
        selection("bdo$cssSelector", init)

/**
 * Will define a 
-tags css query selector. * By default it will just be the specific tag-name. * It is possible to define a more concrete selector by using the provided fields of the CssSelector object or * by passing a raw css query selector as parameter. * If a selector is passed as parameter as well as be defined via CssSelector fields, they will be merged. * @see CssSelector * @param cssSelector * @return T */ public fun CssSelectable.br(cssSelector: String = "", init: CssSelector.() -> T): T = selection("br$cssSelector", init) /** * Will define a -tags css query selector. * By default it will just be the specific tag-name. * It is possible to define a more concrete selector by using the provided fields of the CssSelector object or * by passing a raw css query selector as parameter. * If a selector is passed as parameter as well as be defined via CssSelector fields, they will be merged. * @see CssSelector * @param cssSelector * @return T */ public fun CssSelectable.cite(cssSelector: String = "", init: CssSelector.() -> T): T = selection("cite$cssSelector", init) /** * Will define a -tags css query selector. * By default it will just be the specific tag-name. * It is possible to define a more concrete selector by using the provided fields of the CssSelector object or * by passing a raw css query selector as parameter. * If a selector is passed as parameter as well as be defined via CssSelector fields, they will be merged. * @see CssSelector * @param cssSelector * @return T */ public fun CssSelectable.code(cssSelector: String = "", init: CssSelector.() -> T): T = selection("code$cssSelector", init) /** * Will define a -tags css query selector. * By default it will just be the specific tag-name. * It is possible to define a more concrete selector by using the provided fields of the CssSelector object or * by passing a raw css query selector as parameter. * If a selector is passed as parameter as well as be defined via CssSelector fields, they will be merged. * @see CssSelector * @param cssSelector * @return T */ public fun CssSelectable.data(cssSelector: String = "", init: CssSelector.() -> T): T = selection("data$cssSelector", init) /** * Will define a -tags css query selector. * By default it will just be the specific tag-name. * It is possible to define a more concrete selector by using the provided fields of the CssSelector object or * by passing a raw css query selector as parameter. * If a selector is passed as parameter as well as be defined via CssSelector fields, they will be merged. * @see CssSelector * @param cssSelector * @return T */ public fun CssSelectable.dfn(cssSelector: String = "", init: CssSelector.() -> T): T = selection("dfn$cssSelector", init) /** * Will define a -tags css query selector. * By default it will just be the specific tag-name. * It is possible to define a more concrete selector by using the provided fields of the CssSelector object or * by passing a raw css query selector as parameter. * If a selector is passed as parameter as well as be defined via CssSelector fields, they will be merged. * @see CssSelector * @param cssSelector * @return T */ public fun CssSelectable.em(cssSelector: String = "", init: CssSelector.() -> T): T = selection("em$cssSelector", init) /** * Will define a -tags css query selector. * By default it will just be the specific tag-name. * It is possible to define a more concrete selector by using the provided fields of the CssSelector object or * by passing a raw css query selector as parameter. * If a selector is passed as parameter as well as be defined via CssSelector fields, they will be merged. * @see CssSelector * @param cssSelector * @return T */ public fun CssSelectable.i(cssSelector: String = "", init: CssSelector.() -> T): T = selection("i$cssSelector", init) /** * Will define a -tags css query selector. * By default it will just be the specific tag-name. * It is possible to define a more concrete selector by using the provided fields of the CssSelector object or * by passing a raw css query selector as parameter. * If a selector is passed as parameter as well as be defined via CssSelector fields, they will be merged. * @see CssSelector * @param cssSelector * @return T */ public fun CssSelectable.kbd(cssSelector: String = "", init: CssSelector.() -> T): T = selection("kbd$cssSelector", init) /** * Will define a -tags css query selector. * By default it will just be the specific tag-name. * It is possible to define a more concrete selector by using the provided fields of the CssSelector object or * by passing a raw css query selector as parameter. * If a selector is passed as parameter as well as be defined via CssSelector fields, they will be merged. * @see CssSelector * @param cssSelector * @return T */ public fun CssSelectable.mark(cssSelector: String = "", init: CssSelector.() -> T): T = selection("mark$cssSelector", init) /** * Will define a -tags css query selector. * By default it will just be the specific tag-name. * It is possible to define a more concrete selector by using the provided fields of the CssSelector object or * by passing a raw css query selector as parameter. * If a selector is passed as parameter as well as be defined via CssSelector fields, they will be merged. * @see CssSelector * @param cssSelector * @return T */ public fun CssSelectable.q(cssSelector: String = "", init: CssSelector.() -> T): T = selection("q$cssSelector", init) /** * Will define a -tags css query selector. * By default it will just be the specific tag-name. * It is possible to define a more concrete selector by using the provided fields of the CssSelector object or * by passing a raw css query selector as parameter. * If a selector is passed as parameter as well as be defined via CssSelector fields, they will be merged. * @see CssSelector * @param cssSelector * @return T */ public fun CssSelectable.rb(cssSelector: String = "", init: CssSelector.() -> T): T = selection("rb$cssSelector", init) /** * Will define a -tags css query selector. * By default it will just be the specific tag-name. * It is possible to define a more concrete selector by using the provided fields of the CssSelector object or * by passing a raw css query selector as parameter. * If a selector is passed as parameter as well as be defined via CssSelector fields, they will be merged. * @see CssSelector * @param cssSelector * @return T */ public fun CssSelectable.rtc(cssSelector: String = "", init: CssSelector.() -> T): T = selection("rtc$cssSelector", init) /** * Will define a -tags css query selector. * By default it will just be the specific tag-name. * It is possible to define a more concrete selector by using the provided fields of the CssSelector object or * by passing a raw css query selector as parameter. * If a selector is passed as parameter as well as be defined via CssSelector fields, they will be merged. * @see CssSelector * @param cssSelector * @return T */ public fun CssSelectable.ruby(cssSelector: String = "", init: CssSelector.() -> T): T = selection("ruby$cssSelector", init) /** * Will define a -tags css query selector. * By default it will just be the specific tag-name. * It is possible to define a more concrete selector by using the provided fields of the CssSelector object or * by passing a raw css query selector as parameter. * If a selector is passed as parameter as well as be defined via CssSelector fields, they will be merged. * @see CssSelector * @param cssSelector * @return T */ public fun CssSelectable.s(cssSelector: String = "", init: CssSelector.() -> T): T = selection("s$cssSelector", init) /** * Will define a -tags css query selector. * By default it will just be the specific tag-name. * It is possible to define a more concrete selector by using the provided fields of the CssSelector object or * by passing a raw css query selector as parameter. * If a selector is passed as parameter as well as be defined via CssSelector fields, they will be merged. * @see CssSelector * @param cssSelector * @return T */ public fun CssSelectable.samp(cssSelector: String = "", init: CssSelector.() -> T): T = selection("samp$cssSelector", init) /** * Will define a -tags css query selector. * By default it will just be the specific tag-name. * It is possible to define a more concrete selector by using the provided fields of the CssSelector object or * by passing a raw css query selector as parameter. * If a selector is passed as parameter as well as be defined via CssSelector fields, they will be merged. * @see CssSelector * @param cssSelector * @return T */ public fun CssSelectable.small(cssSelector: String = "", init: CssSelector.() -> T): T = selection("small$cssSelector", init) /** * Will define a -tags css query selector. * By default it will just be the specific tag-name. * It is possible to define a more concrete selector by using the provided fields of the CssSelector object or * by passing a raw css query selector as parameter. * If a selector is passed as parameter as well as be defined via CssSelector fields, they will be merged. * @see CssSelector * @param cssSelector * @return T */ public fun CssSelectable.span(cssSelector: String = "", init: CssSelector.() -> T): T = selection("span$cssSelector", init) /** * Will define a -tags css query selector. * By default it will just be the specific tag-name. * It is possible to define a more concrete selector by using the provided fields of the CssSelector object or * by passing a raw css query selector as parameter. * If a selector is passed as parameter as well as be defined via CssSelector fields, they will be merged. * @see CssSelector * @param cssSelector * @return T */ public fun CssSelectable.strong(cssSelector: String = "", init: CssSelector.() -> T): T = selection("strong$cssSelector", init) /** * Will define a -tags css query selector. * By default it will just be the specific tag-name. * It is possible to define a more concrete selector by using the provided fields of the CssSelector object or * by passing a raw css query selector as parameter. * If a selector is passed as parameter as well as be defined via CssSelector fields, they will be merged. * @see CssSelector * @param cssSelector * @return T */ public fun CssSelectable.sub(cssSelector: String = "", init: CssSelector.() -> T): T = selection("sub$cssSelector", init) /** * Will define a -tags css query selector. * By default it will just be the specific tag-name. * It is possible to define a more concrete selector by using the provided fields of the CssSelector object or * by passing a raw css query selector as parameter. * If a selector is passed as parameter as well as be defined via CssSelector fields, they will be merged. * @see CssSelector * @param cssSelector * @return T */ public fun CssSelectable.sup(cssSelector: String = "", init: CssSelector.() -> T): T = selection("sup$cssSelector", init) /** * Will define a