New
v2.0.0
-
Breaking changes
- Extracting using a CSS query string as extractor will now extract elements instead of text. This allows easier
chaining of extractors and CSS selectors and fits more nicely the current extractor model. The old behavior can be
recovered by wrapping the CSS query string in the
textscontent extractor, e.g.doc >> texts("myQuery"); HtmlExtractor,HtmlValidatorandElementQuerynow have an additional type parameter for the type ofElementthey work on. If you have custom instances of one of those classes, filling the missing parameter withElement(which is a superclass of all elements) should be enough for them to work with all source code using scala-scraper 1.x;- Methods for loading extractors and validators from a config were extracted to a separate module. In order to use
them users must add
scala-scraper-configto their SBT dependencies and importnet.ruippeixotog.scalascraper.config.dsl.DSL._; - The implicit conversion of
Validated/Eitherto aRightProjectionin order to expose , and in for comprehensions was moved to a separate object that is not imported together with the DSL. Either upgrade to Scala 2.12 (in which is already right-biased) or import the new support object;
- Extracting using a CSS query string as extractor will now extract elements instead of text. This allows easier
chaining of extractors and CSS selectors and fits more nicely the current extractor model. The old behavior can be
recovered by wrapping the CSS query string in the