akane0151/target-crawler
最新稳定版本:0.9.7
Composer 安装命令:
composer create-project akane0151/target-crawler
包简介
target crawler - A simple Laravel crawler package to read element of any webpage.
README 文档
README
Laravel TargetCrawler
An awesome crawler to simply fetch your specific data from any pages!
Explore the docs »
Table of Contents
Usage
_Below is an example of how you can use this package in your laravel project.
- Install it as composer package in your project
composer require akane0151/target-crawler
- Publish its config in your laravel config directory
php artisan vendor:publish
- Set your target website url and the html elements in config/targetCrawler.php
'url' => "https://google.com" 'elements' => array( 'a .menu-item', 'table tbody tr .id' )
- Add _Akane0151\TargetCrawler\TargetCrawler namespace to your code and call crawl function as below example
public function getPrice(){ //call doCrawl to execute crawl request to target and fetch the element data return TargetCrawler::doCrawl(); }
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE.txt for more information.
Contact
Ali kameli akane0151@yahoo.com
统计信息
- 总下载量: 17
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-02-13