-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.php
More file actions
26 lines (23 loc) · 901 Bytes
/
index.php
File metadata and controls
26 lines (23 loc) · 901 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
require 'vendor/autoload.php';
use Mediashare\Spider\Entity\Config;
use Mediashare\Spider\Entity\Url;
use Mediashare\Spider\Spider;
// Website Config
$config = new Config();
$config->setWebspider(false); // Crawl all website
// $config->setPathRequires(['/Kernel/']); // Not crawl other path
// $config->setPathExceptions(['/CodeSnippet/']); // Not crawl this path
// Modules
$config->setReportsDir(__DIR__.'/reports/'); // Default reports path
$config->setModulesDir(__DIR__.'/modules/'); // Default modules path
$config->enableDefaultModule(false); // Enable default SEO kernel modules
$config->removeModule('FileDownload'); // Disable Module
// Prompt Console / Dump
$config->setVerbose(true); // Prompt verbose output
$config->setJson(false); // Prompt json output
// Url
$url = new Url('https://marquand.pro');
// Run Spider
$spider = new Spider($url, $config);
$result = $spider->run();