nadim/crawling
最新稳定版本:1.0
Composer 安装命令:
composer require nadim/crawling
包简介
A package to crawl google search results with multiple keywords.
README 文档
README
crawling is a PHP library crawling google search result.
Installation
If you use docker you can run the following command to set up your environment.
First you need to create a docker-compose.yaml file
version: '3'
services:
websrv:
image: php:8.1-apache-buster
container_name: kr_webserver
volumes:
- "./sites:/var/www/html/"
ports:
- 80:80
- 443:443
Then run this command:
docker up -d
And finally you need to install composer using the bash.
docker compose exec websrv bash curl -sS https://getcomposer.org/installer | php mv composer.phar /usr/local/bin/composer
Now your environment is ready with apache2 && PHP
We use serpapi to get a full json response from Google you need to set up an account and get your API key.
To install the package run:
composer require nadim/crawling
Usage
require_once "./vendor/autoload.php"; $client = new \SearchEngine\SearchEngine(); $client->setEngine("YOUR_ENGINE"); $client->setApi("YOUR_API_KEY"); $results = $client->search(["ARRAY","OF","KEYWORDS"]);
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
License
统计信息
- 总下载量: 3
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-08-11