Coverage for src/lilbee/crawler/messages.py: 100%
8 statements
« prev ^ index » next coverage.py v7.15.2, created at 2026-11-06 08:17 +0000
« prev ^ index » next coverage.py v7.15.2, created at 2026-11-06 08:17 +0000
1"""The words a crawl shows a user when it cannot run, or when a site or crawlberg refuses it."""
3from __future__ import annotations
5CHROMIUM_MISSING_MESSAGE = (
6 "The headless Chromium browser is not installed. "
7 "Run 'lilbee setup crawler' to enable browser-mode crawling."
8)
9# ``{reason}`` is crawlberg's own error text.
10CRAWL_REFUSED_MESSAGE = "crawlberg refuses to start this crawl: {reason}"
11BROWSER_FLAGS_REFUSED_MESSAGE = (
12 "The crawl_browser_extra_args setting holds a launch flag that crawlberg refuses: {reason}"
13)
14EXCLUDE_PATTERN_REFUSED_MESSAGE = (
15 "The crawl_exclude_patterns setting holds a pattern that crawlberg refuses: {reason}"
16)
17# ``{library}`` is the file the dynamic loader could not find; ``{command}`` is the shell command
18# that installs it; ``{reason}`` is crawlberg's own text.
19CHROMIUM_LIBRARY_MISSING_MESSAGE = (
20 "Chromium cannot start because the system library {library} is missing. "
21 "Run this command with administrator rights to install the libraries Chromium needs: "
22 "{command} ({reason})"
23)
24ROBOTS_REFUSED_MESSAGE = (
25 "The site's robots.txt does not allow crawlers to fetch this page. "
26 "Set crawl_respect_robots_txt to false to crawl it."
27)
28ROBOTS_UNREACHABLE_MESSAGE = (
29 "The site's robots.txt could not be read ({reason}), so no page of the site is crawled. "
30 "Set crawl_respect_robots_txt to false to crawl the site without reading its robots.txt."
31)