Roach PHP is a complete web scraping toolkit for PHP. Not only does it handle the crawling of web content, but it also provides an entire pipeline to process scraped data, making it an all-in-one resource for scraping web pages with PHP.
The main features this package provides (among many other awesome web scraping features) include:
- Define Spiders (classes) designed to crawl web pages
- Data pipelines to process and collect data that spiders crawl
- Easily extract data from HTML and XML documents
- Interactive shell
- Spider middleware
- Write extensions to hook into/extend Roach PHP features
- Built-in Logging extension
While Roach PHP is framework agnostic and integrates it with any PHP project, there is a first-party roach-php/laravel package to start using Roach within Laravel projects easily. The Laravel package defines convenient services for Roach PHP and CLI commands to create spiders and run an Interactive Shell:
1# Create a spider class2php artisan roach:spider LaravelDocsSpider3 4# Start a REPL with a given URL5php artisan roach:shell https://laravel-news.com
0 comments:
Post a Comment
Thanks