akane0151 / target-crawler
target crawler - A simple Laravel crawler package to read element of any webpage.
Installs: 14
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:project
Requires
- fabpot/goutte: ^4.0
- guzzlehttp/guzzle: ^7.0.1
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