|
1 | 1 | <?php
|
2 | 2 |
|
| 3 | +/* |
| 4 | + * This file is part of the snippetify package. |
| 5 | + * |
| 6 | + * (c) Evens Pierre <[email protected]> |
| 7 | + * |
| 8 | + * For the full copyright and license information, please view the LICENSE |
| 9 | + * file that was distributed with this source code. |
| 10 | + */ |
| 11 | + |
3 | 12 | namespace Snippetify\SnippetSniffer;
|
4 | 13 |
|
5 | 14 | class Core
|
6 | 15 | {
|
7 |
| - const APP_NAME = 'Snippet sniffer'; |
8 |
| - const APP_TYPE = 'snippetify-sniffer'; |
9 |
| - const APP_VERSION = '1.0.0'; |
10 |
| - const USER_AGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:65.0) Gecko/20100101 Firefox/65.0'; |
| 16 | + public const APP_NAME = 'Snippet sniffer'; |
| 17 | + public const APP_TYPE = 'snippetify-sniffer'; |
| 18 | + public const APP_VERSION = '1.1.0'; |
| 19 | + |
| 20 | + // Crawler |
| 21 | + public const CRAWLER_PROFILE = \Spatie\Crawler\CrawlSubdomains::class; |
| 22 | + public const CRAWLER_CONCURENCY = 10; |
| 23 | + public const CRAWLER_IGNORE_ROBOTS = true; |
| 24 | + public const CRAWLER_MAXIMUM_DEPTH = 50; |
| 25 | + public const CRAWLER_EXECUTE_JAVASCRIPT = false; |
| 26 | + public const CRAWLER_MAXIMUM_CRAWL_COUNT = 1500; |
| 27 | + public const CRAWLER_PARSEABLE_MIME_TYPES = 'text/html'; |
| 28 | + public const CRAWLER_MAXIMUM_RESPONSE_SIZE = 1024 * 1024 * 3; |
| 29 | + public const CRAWLER_DELAY_BETWEEN_REQUESTS = 250; |
| 30 | + public const CRAWLER_USER_AGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:65.0) Gecko/20100101 Firefox/65.0'; |
| 31 | + |
| 32 | + /** |
| 33 | + * Html Snippet tags |
| 34 | + * Add all html snippet tags here |
| 35 | + * |
| 36 | + * @var array |
| 37 | + */ |
| 38 | + public const HTML_SNIPPET_TAGS = 'pre[class] code, div[class] code, .highlight pre, code[class]'; |
| 39 | + |
| 40 | + /** |
| 41 | + * Html Snippet tags |
| 42 | + * Add all html snippet tags here |
| 43 | + * |
| 44 | + * @var array |
| 45 | + */ |
| 46 | + public const HTML_TAGS_TO_INDEX = 'h1, h2, h3, h4, h5, h6, p, li'; |
11 | 47 |
|
12 | 48 |
|
13 | 49 | /**
|
|
0 commit comments