HeadlinesBriefing favicon HeadlinesBriefing.com

domharvest-playwright 1.3.0 Adds DSL and Auth

DEV Community •
×

domharvest-playwright just released version 1.3.0, introducing a declarative DSL for data extraction and comprehensive authentication support. This update aims to simplify how developers build web scrapers, eliminating verbose boilerplate code. The release also enforces strict code coverage thresholds, ensuring a robust testing infrastructure for the project's most significant update since launch.

The new DSL offers six core helpers—text, attr, array, exists, html, and count—that streamline data extraction. Instead of manual querySelector chains, developers now define what to extract. This shift toward declarative syntax allows for cleaner, more maintainable code. It works alongside existing methods, so you can migrate gradually without breaking changes.

Authentication is handled through a new `login()` helper and a `SessionManager` class. These tools automate form filling and persist browser states like cookies and localStorage. This unlocks scraping for private repositories and user-specific dashboards. Multi-account scraping becomes trivial, as sessions can be saved and loaded on demand.

For developers, this means less time writing repetitive DOM traversal logic and more focus on data structure. The move toward browser-side execution in pure DSL mode also promises performance gains. It’s a practical update that addresses real-world scraping challenges, from complex logins to messy HTML parsing.