collab/module-scraper
最新稳定版本:1.0.2
Composer 安装命令:
composer require collab/module-scraper
包简介
Simple wrapper for the phpscraper library which provides Magento Service for scraping web pages.
README 文档
README
The Collab_Scraper module is a simple wrapper for PHPScraper which provides service for scraping data from websites.
PHPScraper is a versatile web-utility for PHP. Its primary objective is to streamline the process of extracting information from websites, allowing you to focus on accomplishing tasks without getting caught up in the complexities of selectors, data structure preparation, and conversion.
Basic usage
use Collab\Scraper\Service\ScraperService; ... public function __construct( ScraperService $scraperService ) { $this->scraperService = $scraperService; } ... public function getScrapedData(): ?string { $url = 'https://www.example.com'; $data = $this->scraperService->go($url); echo $data->title; // Title of the page return $data; }
Full documentation for PHPScraper can be found here.
Installation details
composer require collab/module-scraper bin/magento setup:upgrade
统计信息
- 总下载量: 260
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-02-26