Skip to content

Fix: E-E-A-T "Pages with Author Info" always 0, author lost on reload - #119

Open
erikvanberkum wants to merge 1 commit into
PhialsBasement:mainfrom
erikvanberkum:fix/eeat-author-count
Open

erikvanberkum wants to merge 1 commit into
PhialsBasement:mainfrom
erikvanberkum:fix/eeat-author-count

Conversation

@erikvanberkum

Copy link
Copy Markdown

Fixes #118. A minimal, conflict-free version of the author fix in #72, rebased on current main and without the unrelated i18n, Docker and template changes.

Problem

The E-E-A-T tab always shows 0 "Pages with Author Info":

  1. web/static/plugins/e-e-a-t.js checks url.meta_author, which the crawler never sets. SEOExtractor.extract_meta_tags stores <meta name="author"> as author (and in meta_tags.author).
  2. crawled_urls has no author column, so a saved or resumed crawl loses author on reload.

Changes

  • e-e-a-t.js: new hasAuthor(url): url.author, meta_tags.author (crawls saved before this change), og_tags.author, or an author anywhere in the JSON-LD, including inside @graph (Yoast and Rank Math put it there).
  • crawl_db.py: author TEXT in the schema, an ALTER TABLE migration for existing databases (same pattern as the other migrations), and author in save_url_batch().
  • tests: test_author_survives_reload: the meta author fills the row, survives save + reload, and an older database gains the column. It fails on current main and passes with this change. Full suite: 154 passed, 0 failed.

Not in this PR

🤖 Generated with Claude Code

The E-E-A-T plugin checked url.meta_author, which the crawler never sets:
<meta name="author"> is stored as `author` (and meta_tags.author). The
plugin now checks author, meta_tags.author, og:author and an `author` in
JSON-LD (also inside @graph).

crawled_urls had no author column, so saved and resumed crawls lost it.
Add the column, a migration for existing databases, and save it in
save_url_batch(). New fixture test: test_author_survives_reload.

Fixes PhialsBasement#118

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@erikvanberkum

Copy link
Copy Markdown
Author
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

E-E-A-T plugin: "Pages with Author Info" is always 0 (checks url.meta_author, which is never set)

1 participant