skrapeit / skrape.it

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. It aims to be a testing lib, but can also be used to scrape websites in a convenient fashion.
https://docs.skrape.it
MIT License
813 stars 59 forks source link

[FEATURE] cascading CSS-Selectors #79

Closed skrapeit closed 4 years ago

skrapeit commented 4 years ago

I think it would be really awesome if skrape{it} would provide a way to build css-selectors in a cascading way to provide simple and easily readable way to create complex css sector queries

Describe the solution you'd like e.g. simular to:

...
        p {
            withClass = "first"
            p {
                withClass = "second"
                p {
                    withClass = "third"
                    findFirst {
                         // do something
                    }
                }
            }
        }

// which should create this selector: "p.first p.second p.third"
christian-draeger commented 4 years ago

fixed by #88