Larascraper unifies Laravel web scraping across HTTP and headless browser in one API
Larascraper is a new Laravel package by Eduardo Lazaro that consolidates HTTP-based and JavaScript-rendered web scraping into a single unified toolchain. Previously, developers had to juggle Guzzle for static HTML pages and Puppeteer scripts for JavaScript-heavy sites, requiring separate mental models and glue code. The package introduces a Scraper class and a Crawler class, allowing developers to fetch pages, interact with browser elements such as clicking, typing, and scrolling, and extract structured DOM data using a fluent query-builder interface. It supports both a Puppeteer-backed headless browser driver and a lightweight HTTP driver, with the driver switchable per request using a simple method call. Optional waits and configurable timeouts give developers control over how the scraper handles empty or slow-loading results without throwing errors.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in