38 Commits
Author SHA1 Message Date
phialsbasement f9d3305f93 README: lower sponsor tiers to match the GitHub Sponsors page
The tiers were retired and replaced on GitHub Sponsors: $20/$100/$500 were
far above what comparable repos charge, as the first sponsor enquiry showed.
Freelancer is now $10, Agency $25, and the top spot is a $50 Featured tier.
2026-12-02 05:44:14 +11:00
phialsbasement 789c2364b4 README: step-by-step Quick Start for Windows, Mac and Linux
A Mac user couldn't install LibreCrawl and only found Windows tutorials.
Spell out the steps per OS (python.org installer, Download ZIP, Terminal on
Mac), and correct what was outdated after the start-script fixes: the script
installs into its own .venv, needs Python 3.11+ (not 3.8), and does not
install Python on Windows. The manual Python steps use a venv, since
Homebrew and recent Linux Python refuse a system-wide pip install.
2026-11-10 09:02:13 +11:00
phialsbasement a8d31c30e0 Fix: start-librecrawl.sh was not executable after git clone
It was stored as 100644, so ./start-librecrawl.sh failed with "permission
denied" on Linux. CI didn't notice because the wait helper ran chmod +x on
the script itself; it no longer does, so CI now catches a missing bit.
2026-11-10 09:02:13 +11:00
phialsbasement 1bf4ca011f CI: run the start script on macOS with the python.org installer
Beginners on a new Mac don't have Homebrew; they install Python from
python.org. Install that .pkg, put its Python first on PATH as the
installer's shell-profile step does, and check the script uses it.
2026-11-10 08:34:03 +11:00
phialsbasement 5198986373 Fix: LibreCrawl crashes on Windows when its output is redirected
Windows encodes redirected stdout in cp1252, so the first log line with an
emoji (the SECRET_KEY warning) raised UnicodeEncodeError and main.py exited
before the server started. Hit by the Windows CI job; also affects anyone
logging to a file or running it as a service. A console window is fine,
which is why it went unnoticed. Reconfigure stdout/stderr to UTF-8.
2026-11-10 08:22:42 +11:00
phialsbasement b4d2e7e3f5 Fix: start-librecrawl.bat failed without Python on PATH or with py only
- It detected the py launcher (set PYTHON=py) but never used it, and called
  bare pip and playwright, which only work if "Add Python to PATH" was
  ticked. Use the detected interpreter, a .venv like the .sh, and
  python -m pip / python -m playwright.
- Require Python 3.11+, matching the Docker image.
- Install requirements on every start, so new dependencies arrive.
- Docker: check Compose and that the daemon is running, and stop with a
  message if docker compose up fails, instead of printing "LibreCrawl is
  running!" regardless.
- Pause on errors so a double-clicked window stays open to read them.
2026-11-10 08:20:30 +11:00
phialsbasement 75d5a36406 Fix: start-librecrawl.sh Docker check accepted Docker without Compose
`command -v docker compose` succeeds whenever docker exists, since bash
doesn't fail on the missing "compose" name, so the script took the Docker
path without the Compose plugin and failed at `docker compose up`. Check
`docker compose version` instead, and say clearly when Docker is installed
but not running.
2026-11-10 08:20:30 +11:00
phialsbasement 5b354f2685 CI: drop the Docker job, fix the Ubuntu and Windows start-script jobs
- Remove the Linux Docker job: it rebuilt the image, with all three
  Playwright browsers, on every run and took 6+ minutes alone.
- Ubuntu container: install libatomic1, which desktop Ubuntu ships but the
  container image doesn't; Playwright's driver failed without it.
- Windows: hide docker.exe by renaming it. Filtering PATH missed the
  runner's Docker, so the job stopped before running the .bat.
2026-11-10 08:20:30 +11:00
phialsbasement abc147749a CI: run the start scripts on Linux (Docker and Python), macOS and Windows
- Linux with Docker: the route the README recommends, building the image.
- Ubuntu 24.04 container without Docker: Debian/Ubuntu Python also refuses
  global pip installs.
- macOS: as before, now via a shared wait helper.
- Windows: start-librecrawl.bat with Docker hidden from PATH, because
  Windows runners only run Windows containers. Docker on Windows is not
  covered.

Expected to fail on Windows: the .bat calls bare pip and playwright and
never uses the py launcher it detects.
2026-11-10 08:12:10 +11:00
phialsbasement 9eb623c069 Fix: start script fails on Homebrew and recent Linux Python (PEP 668)
Homebrew Python, and Python on recent Debian/Ubuntu and Arch, refuse global
pip installs ("externally-managed-environment"), so the script's Python path
stopped at "Failed to install dependencies!". Confirmed on the macOS CI
runner (run 42697249567, Homebrew Python 3.15.2). A Mac user reported the
same dead end.

- Install into a .venv created by the script instead of system-wide.
- Run Playwright as python -m playwright: the bare command isn't on PATH
  when pip installs into a user or venv directory.
- Require Python 3.11+, matching the Docker image; Apple's bundled 3.9 now
  gets a clear message instead of a later failure.
- Install requirements on every start: checking only for Flask meant
  dependencies added in an update were never installed.
- .venv/ in .gitignore.
2026-11-10 08:04:50 +11:00
phialsbasement 9e78404dbb CI: fixture tests on Linux and start script on macOS
Runs the fixture test suite on Python 3.11 (the Docker image's version) and
runs start-librecrawl.sh on an Apple Silicon macOS runner with Homebrew
Python, waiting for the server to answer. macOS runners have no Docker, so
the script takes the Python path that Mac users without Docker get.

Expected to fail on macOS for now: Homebrew Python refuses global pip
installs (PEP 668), which is what a user reported. The fix follows in a
separate commit so the failure is on record first.
2026-11-10 07:34:04 +11:00
phialsbasement f25bee606c Feature: crawl analysis, indexability, link metrics, sitemap audit, crawl comparison
Site-wide crawl analysis that runs once when a crawl finishes, linear in
URLs + links:
- Indexability column (Indexable / Non-Indexable + reason), reading the
  X-Robots-Tag header as well as the robots meta tag
- Duplicate title, meta description and H1 across indexable pages;
  multiple title / meta description / H1 tags per page
- Redirect chains, loops and redirects to broken URLs, followed or not
- Unique inlinks/outlinks and Link Score (internal PageRank, 0-100)
- Per-page broken internal/external links and links to redirects
- Canonicals pointing at non-indexable URLs, canonical chains, multiple and
  conflicting canonicals (HTML tags and Link headers)
- Sitemap audit: orphan pages, non-indexable URLs in the sitemap, indexable
  pages missing from it

Crawl comparison tab and /api/crawls/compare (JSON or CSV): new/removed
URLs, status, indexability, title, meta, H1, canonical and word-count
changes, and issues that appeared or were resolved.

Hardening found by fuzzing: a malformed href, Location or sitemap <loc> no
longer loses a page or the rest of the sitemap; UTF-8 headers decode
correctly; a corrupt DB value can no longer empty a loaded crawl. Resumed
crawls no longer save end-of-crawl issues twice, and linked_from is saved
complete.
2026-11-07 13:06:50 +11:00
phialsbasement b5b288f489 Fix: self-hosted accounts stuck unverified without email (#100)
Standard mode (the Docker default) verifies accounts by email, but Docker
doesn't pass SMTP settings through and .env.example ships placeholder
credentials, so on most self-hosted installs no verification email was ever
sent. The owner's own account stayed unverified on the guest tier, and login
said "Please wait for admin approval" on a server with no admin and no
admin UI.

- email_service: is_email_configured(), treating the .env.example
  placeholders as not configured.
- auth_db: claim_first_admin() makes the first account a verified admin when
  the instance has no admin (the local/skip-auth synthetic admins don't
  count), under a write lock so concurrent registrations can't both win.
  Used only when email is not configured, so servers that verify by email
  are unaffected.
- register: without email, the first account becomes admin; later ones are
  told the server operator has to approve them.
- login: an unverified account on a server without email and without an
  admin claims admin, which un-sticks installs that registered before this.
  The unverified messages now say what to actually do.
- manage.py: users / approve / set-tier, so operators don't need SQL.
- main: load .env before importing src modules; email_service read its SMTP
  settings at import time, before .env was loaded.
- README: Docker starts in standard mode (it said local mode); document
  account management.
- tests: first-admin, later accounts, approve, stuck account, SMTP servers
  unaffected, and a concurrent-registration race.
2026-11-06 16:15:27 +11:00
phialsbasement fefc66ad1d Add GitHub Sponsors: FUNDING.yml and sponsor tiers in README 2026-11-06 14:50:54 +11:00
PhialsBasementandClaude Opus 5.5 38e3bb4b37 Add table column visibility and sorting, polish Columns dropdown
- Click-to-sort headers and per-user hidden columns for the
  Overview/Internal/External tables, persisted via /api/ui/preferences
- Restyle the Columns control as a compact, aligned dropdown that
  floats over the table and closes on outside click / Escape

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 11:27:58 +11:00
phialsbasement 5847b27b1f Tests: n-gram analyzer and crawler extraction 2026-11-05 04:32:26 +11:00
phialsbasement 95c611dde5 Feature: n-gram analysis with filters, virtual scrolling, and export 2026-11-05 04:15:50 +11:00
PhialityandClaude Opus 5.5 8f4d31d560 Feature: custom extraction (CSS/XPath) and list mode
Custom extraction: rules set under Settings > Extraction pull values
out of every crawled page with a CSS selector or an XPath expression
(text, inner HTML, outer HTML or an attribute). Results show in a new
Custom Extraction tab, in the URL details, and in exports as one
extract_<name> column per rule. They persist in SQLite. Invalid
selectors are refused on save, naming the rule. Adds lxml for XPath.

List mode: a Spider | List toggle above the URL box. List mode checks
exactly the pasted or uploaded URLs, on any number of sites, records
links without following them, skips sitemap discovery and outbound
link probing, and reports robots.txt-disallowed URLs as blocked rows.
Resume keeps the whole remaining list.

Also: robots.txt is fetched once per host instead of once per worker,
and a failed start now shows its reason instead of "undefined".

Adds test_list_mode_fetches_only_the_list and test_custom_extraction.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 04:22:09 +11:00
PhialityandClaude Opus 5.5 5ae2792614 Fix: crawl delay ignored with JavaScript rendering off
The rate limiter was only called in the JavaScript crawl loop. The
plain HTTP worker never acquired it, so the delay setting had no
effect and sites were hit as fast as concurrency allowed. The worker
now waits before each page fetch, outside the response timer.

Adds test_crawl_delay_is_honoured.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 08:00:05 +11:00
PhialityandClaude Opus 5.5 061c170dec Harness: allow HEAD-checked off-site rows
Since ce5616c, external links and off-site images get HEAD-checked
rows marked link_check_only even with external crawling off. The
off-domain check now flags only off-site pages that were crawled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 07:56:25 +11:00
PhialityandClaude Opus 5.5 7c9ec449ce Fix: crawl slowed to a crawl on large sites
Link bookkeeping was quadratic. Every link scanned all crawl results
for its target status, every link scanned a growing list of source
pages, and every UI poll rechecked all links while holding the lock
the crawl workers need.

Statuses now come from an incremental URL index that touches each
result and each link once, and source pages are an ordered set.
At 5,000 pages the link manager takes 11.6s instead of 91s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 07:53:39 +11:00
PhialityandClaude Opus 5.5 94128b733c Fix: Save Crawl failed on large crawls
Saving built the whole crawl as one JSON string, which overflows the
browser's ~512 MB string limit (RangeError: Invalid string length) on
crawls of ~30k pages with millions of links. Save now writes the file
a row at a time, and Load parses it a row at a time. Old indented save
files still load.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 07:48:50 +11:00
Phiality 05a1372de8 Fix: Screaming Frog licence is $279/year, not $259
Their pricing page now lists $279 / £199 / €245 per user per year, with
bulk bands below that from five seats up. The old figure was also across
librecrawl.com, which has been corrected separately.
2026-09-29 18:57:38 +10:00
PhialsBasementandClaude Opus 5.5 3a93daa6d8 Fix: Zoho login failed with "An error occurred"
The authorize request sent prompt=select_account, which Zoho doesn't
support (its only valid value is "consent"). Zoho showed a generic error
page instead of the sign-in screen. Drop the parameter.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 12:34:46 +10:00
PhialsBasementandClaude Opus 5.5 d451885216 Add optional Zoho OAuth login
Setting ZOHO_OAUTH_ENABLED with a client ID and secret adds a "Login
with Zoho" button to the login page. Zoho users are matched by a new
users.zoho_id column. An existing account with the same email is linked
to Zoho. Otherwise a new verified account is created, unless
ZOHO_ALLOW_SIGNUP is off, which is the default when registration is
disabled.

Also configurable: redirect URI, data-center accounts server, scopes,
allowed email domains and the tier for new accounts. All are documented
in .env.example and passed through in docker-compose.yml.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 12:20:46 +10:00
PhialsBasementandClaude Opus 5.5 26cce27bf0 Keep link-check-only external rows out of the Overview
External links that were only HEAD-checked (Crawl External off) now get
a link_check_only flag, saved with the crawl. The Overview leaves those
rows out, since those sites were not crawled; the External tab still
lists them. Off-site images and crawled pages are not flagged.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 12:20:46 +10:00
PhialsBasementandClaude Opus 5.5 ce5616c472 External tab populated without crawling external sites
With Crawl External off, external <a> targets are now HEAD-checked like
images and get a synthesized row (status, type, size), so the External
tab and Links-tab statuses fill in without fetching the other site.
HEAD refusals (403/405/501) are confirmed with a streamed GET. Image
and external checks share one helper across both crawl paths.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 09:46:19 +10:00
PhialsBasementandClaude Opus 5.5 512e1b103e Fix: images hosted on a CDN never HEAD-checked
Off-domain images were skipped unless Crawl External was on, so sites
serving every image from a CDN (Wix, Shopify, Squarespace) got no image
statuses or Images-tab rows. Embedded images are page assets: check them
wherever they're hosted. Crawl External still gates off-domain pages.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 09:36:31 +10:00
Phiality d0ac5058cc Fix: alt="" was reported as missing alt text (#95)
extract_images used img.get('alt', ''), so an image with no alt attribute
and one correctly marked decorative with alt="" both became the empty
string. The detector then tested truthiness, and correct markup counted
as a defect.

Images now carry has_alt alongside alt, and only a missing attribute is
flagged. The warning also says how many decorative images were found, so
the count is explainable rather than just smaller.

The Links tab had the same conflation, showing "(no alt text)" for both;
it now distinguishes "(decorative)" from "(no alt attribute)".

Crawls saved before has_alt existed carry no flag. Those are left
unflagged rather than guessed at, since the old data cannot tell the two
cases apart. Re-crawl for accurate numbers.

Thanks to musclemintco for the diagnosis, which was exactly right.
2026-09-08 14:05:30 +10:00
PhialsBasementandClaude Fable 5.1 82f40a083a Fix: crawl stuck in "finishing up" on big sites; exports ignoring the chosen format
Duplicate-content detection compared every page with every other page using
SequenceMatcher and emitted two issues per matching pair. On a 1,127-URL site
with ~900 templated suburb pages that meant 4+ minutes of CPU, 703,902 issues,
and a 90-second SQLite insert that locked the database for every other
request (status polls, settings) — the UI sat in "finishing up" until the
crawl was force-stopped.

- issue_detector: one issue per page (count + closest five), identical
  title/description/H1 grouped first, candidate pairs from a prefix filter on
  title tokens, word-level Dice similarity, only 200 HTML pages considered,
  and a 120s time budget so the pass can never hang a crawl.
  900 templated pages: 1.4s / 900 issues (was ~4min / 703k).
- auth_db/crawl_db: 30s busy timeout and WAL mode so reads no longer fail
  with "database is locked" while the crawler saves a batch.

Exports: "Excel (XLSX)" was offered in Settings but never implemented (it
silently produced CSV), XML only applied to the URLs file (links/issues fell
back to CSV), and the export button read the format from the server copy of
the settings, which silently lags the browser copy when the background sync
fails — e.g. while the database was locked by the bug above.

- main: XLSX (openpyxl) and XML for URLs, links and issues on both the
  streaming and legacy export endpoints; shared row helpers.
- app.js/settings.js: export with the settings the browser is showing;
  surface a failed server sync instead of swallowing it; decode base64
  binary exports.
- tests: fixture tests for one-issue-per-page duplicate detection (crawl +
  1,500-page scale check) and for every format × every data type on both
  export endpoints.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-03 12:46:57 +10:00
Phiality 3c710d8ac8 Fix: response time included the JS render wait (#93, #94)
#93: with JS rendering on, response_time was measured around the whole
render, which includes the js_wait_time sleep. At the 3s default every
page cleared the 3000ms threshold and got flagged "Slow Response Time".
Reported on a site scoring 97-99 on PSI with all 54 pages flagged.

render_page now reports the browser's own request timing (responseEnd,
falling back to the measured navigation) as response_time, and the full
render separately as render_time. On librecrawl.com with a 3s wait that
is 957ms vs 4287ms, and nothing is flagged. render_time is stored, shown
in the URL details modal, and added to crawled_urls via migration.

#94: "URLs Discovered" ignored the rows synthesized from image HEAD
checks, since those are never queued. The counter sat at the HTML page
count while crawled climbed past it. Image rows are now marked
discovered when their row is created.

Fixture tests cover both.
2026-08-19 09:35:06 +10:00
Phiality 1d8e70d27b feat: link to the Plugin Workshop
- Workshop button in the app header
- README and the plugins README point at it for finding/sharing plugins

The workshop is back up at workshop.librecrawl.com. On the marketing site
the /workshop redirect now goes there instead of to GitHub, and the nav
links point straight at the subdomain.
2026-08-14 12:45:53 +10:00
Phiality 26019fa37c Fix: connection pool too small for concurrency + image checks
requests defaults to 10 connections per host, but crawl workers and the
image HEAD checks (5 threads of their own) draw from the same pool, so
urllib3 kept discarding live connections and reopening them:

  WARNING:urllib3.connectionpool: Connection pool is full, discarding
  connection: developer.mozilla.org

Mount an adapter sized to concurrency + IMAGE_CHECK_WORKERS + 5, and
resize it when concurrency changes in settings. An MDN crawl went from a
steady stream of these warnings to none.
2026-08-14 12:45:44 +10:00
Phiality aaf5827294 Fix: crawl data sync, redirect resolution, max_urls accounting
Incremental polling sliced server arrays by the client's row count, so
updates to already-sent rows (linked_from, link statuses, image HEAD
results) never reached the UI, and the issue cursor desynced whenever an
exclusion pattern dropped one. Replaced with an event log (seq + epoch);
clients apply appends/updates by key.

- Relative links on redirected pages resolved against the requested URL,
  minting internal 404s from the target site's links; chains now recorded
- Image HEAD checks ignored crawl_external
- Image rows counted against max_urls (25-URL react.dev crawl = 1 page)
- _save_batch_to_db cleared its queues after writing, dropping rows
  appended mid-write (400-page Wikipedia crawl lost 3,693 links)
- Fetches in flight at max_urls hit the DB uncounted
- Sitemap discovery blocked start_crawl; now backgrounded, completion
  waits on it
- start_crawl read session_id before creation, disabling persistence
- Link/issue cells used innerHTML on crawled page content
- Virtual scroller measures real row heights, rAF-throttled, spacers
  track data length

Adds tests/: fixture tests (no network) + real-site harness.
2026-08-13 20:43:41 +10:00
PhialityandClaude Fable 5 a41542cedd Fix: streaming export issue keys, file-loaded crawl fallback (#48)
Follow-up to #48:
- Issues export used nonexistent keys (issue_type/severity/description);
  now matches the real issue dicts and legacy format (type/category/issue/details)
- Crawls loaded from a saved file exist only in browser state, which the
  streaming endpoint can't see — exportData() now falls back to the legacy
  POST /api/export_data path for those instead of downloading a 404 body
- target_status None renders as 'Not crawled' instead of blank (0 stays 0)
- Export field names from the query string are restricted to identifier-like
  strings since they become XML tag names and CSV headers

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 15:54:27 +10:00
PhialityandClaude Fable 5 4cf632b739 feat: make image crawling opt-in, populate Images tab via HEAD checks (#86, #87)
Follow-up to #87: full image downloads are now behind a 'Crawl Images'
checkbox (default off) instead of being in the default include_extensions.
When off, the Images tab is populated from the broken-image HEAD checks
that already run (status, content-type, size from Content-Length) at no
extra request cost. Also guards the issue detector against flagging
non-HTML results for missing titles/meta descriptions.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 15:35:14 +10:00
PhialityandClaude Fable 5 d98ff55d84 Fix: disable export/save buttons while processing (#75)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 15:14:22 +10:00
PhialityandClaude Fable 5 29c5e50c3e Fix: normalize bare domain URLs to prevent false duplicate crawls (#88)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 15:14:22 +10:00