sukohi/search-bot
Larablocks Analysis
sukohi/search-bot works with Laravel 5 (latest release 1.0.5, Feb 15, 2017), which reached end of life: no more fixes, even for security.
Recommendation checks
Not advisedNot advised: no release or commit in over 2 years.
- No release or commit in over 2 years
- Supports only Laravel 5, past end of life
- No release in the last 12 months (last: Feb 15, 2017)
- 0 downloads a month (needs 10,000)
- 2 GitHub stars (needs 100)
State
Likely abandoned- No release or commit in over 2 years.
- Last stable release: Feb 15, 2017.
- No releases in the last 12 months.
- First released: Feb 15, 2017.
- 0 open issues on GitHub.
Data from Packagist and GitHub, checked by Larablocks on Dec 2, 2026.
| Install | |
|---|---|
composer require sukohi/search-bot |
|
| Latest Version: | 1.0.5 |
| Laravel: | 5 |
| License: | MIT |
| Last Updated: | Feb 15, 2017 |
| Links: | GitHub · Packagist |
SearchBot
Laravel package to crawl websites.(Laravel 5+)
Requirements
Installation
Execute the next command.
composer require sukohi/search-bot:1.*
Set the service providers in app.php
'providers' => [
...Others...,
Sukohi\SearchBot\SearchBotServiceProvider::class,
Sukohi\LaravelAbsoluteUrl\LaravelAbsoluteUrlServiceProvider::class,
]
Also alias
'aliases' => [
...Others...,
'LaravelAbsoluteUrl' => Sukohi\LaravelAbsoluteUrl\Facades\LaravelAbsoluteUrl::class,
'SearchBot' => Sukohi\SearchBot\Facades\SearchBot::class,
]
Then execute the next commands.
php artisan vendor:publish
php artisan migrate
Now you have config/search_bot.php which you can set domains restrictions.
Config
return [
'main' => '*',
'yahoo' => ['yahoo.com', 'www.yahoo.com'],
'reddit' => ['www.reddit.com']
];
- If you don't need to set restriction, set
*.
Usage
$starting_url = 'http://yahoo.com';
$options = [
'type' => 'main', // $type is optional.(Default: main),
'url_deletion' => true // Default: true
];
$result = \SearchBot::request($starting_url, $options);
if($result->exists()) {
// Symfony\Component\BrowserKit\Response
// See http://api.symfony.com/2.3/Symfony/Component/BrowserKit/Response.html
$response = $result->response();
// Symfony\Component\DomCrawler/Crawler
// See http://api.symfony.com/2.3/Symfony/Component/DomCrawler/Crawler.html
$crawler = $result->crawler();
$result->links(function($url, $text){
// All links including URL & text will come here.
});
$result->queues(function($crawler_queue, $url, $text){
// All links that do not exist in DB will come here.
// $crawler_queue has already type and url.
$crawler_queue->save();
});
} else {
$e = $result->exception();
echo $e->getMessage();
$type = $result->type();
$url = $result->url();
}
Options
-
type
Type is string that you can decide freely.
Default ismain. -
url_deletion
If true here, URL accessed will be removed from DB.
Default istrue.
License
This package is licensed under the MIT License.
Copyright 2017 Sukohi Kuhoh
Related Packages
Powerful PHP database abstraction layer (DBAL) with many features for database s...
Laravel Serializable Closure provides an easy and secure way to serialize closur...
Cli error handling for console/command-line PHP applications.
Version History
| Version | Released | Laravel | License |
|---|---|---|---|
| 1.0.5 | ~5.0 | MIT | |
| 1.0.4 | ~5.0 | MIT | |
| 1.0.3 | ~5.0 | MIT | |
| 1.0.2 | ~5.0 | MIT | |
| 1.0.1 | ~5.0 | MIT | |
| 1.0.0 | ~5.0 | MIT |