Skip to content

fix(author): fall back to twitter:creator - #874

Merged
Kikobeats merged 12 commits into
masterfrom
fix/author-ui-chrome
Aug 17, 2026
Merged

Kikobeats merged 12 commits into
masterfrom
fix/author-ui-chrome

Conversation

@Kikobeats

@Kikobeats Kikobeats commented Aug 17, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Read twitter:creator as a last-resort author when JSON-LD / meta[name=author] / article:author / itemprop / byline heuristics do not produce a value.
  • author() still strips the @ prefix, so @mayoclinic becomes mayoclinic.
  • Explicit meta[name=author] continues to win over the handle.

Test plan

  • metascraper-author: Mayo Clinic uses twitter:creator; meta[name=author] wins when both exist
  • Integration snapshots updated where author was previously null (bfi, business-today, segment-academy)
  • Tests that omit logo from the snapshot validate it with url()
  • CI green on this PR

Note

Low Risk
Metadata heuristics only; behavior changes are additive fallbacks and test harness narrowing, with no auth or data-path impact.

Overview
Author extraction now falls back to meta[name="twitter:creator"] and meta[property="twitter:creator"] after existing JSON-LD, meta, and DOM heuristics, so pages like Mayo Clinic can resolve an author when nothing else matches. Values still go through the existing author() helper (e.g. @mayoclinic → mayoclinic); higher-priority sources such as meta[name="author"] are unchanged.

Logo adds a rule for [itemprop="logo"] img src, which can pick up nested microdata logos (e.g. jewish-business-news) without favicon/manifest plugins.

Tests: metascraper-author runs AVA unit tests for the Twitter fallback and precedence; integration suites drop metascraper-logo-favicon / metascraper-manifest, assert logo explicitly (often null), and refresh snapshots where author was previously null.

Reviewed by Cursor Bugbot for commit bd0439e. Bugbot is set up for automated code reviews on this repo. Configure here.

Print/share buttons and Elsevier rights links were winning
author. Reject that chrome, read twitter:creator, and collect

Co-authored-by: Cursor <cursoragent@cursor.com>
#author-group names when citation_author is missing.
@coderabbitai

coderabbitai Bot commented Aug 17, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The head commit changed during the review from 2a46047 to edaf656.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/author-ui-chrome

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Kikobeats and others added 8 commits August 17, 2026 18:42
Drop the Elsevier #author-group / xocs selectors. JATS
.given-name + .surname is what the markup actually shares.

Co-authored-by: Cursor <cursoragent@cursor.com>
Site-specific Print/rights strings do not belong in isAuthor.
twitter:creator and given-name/surname already cover the cases.

Co-authored-by: Cursor <cursoragent@cursor.com>
Drop given-name/surname HTML scraping. Sites that omit
citation_author / schema.org / twitter:creator are not
patched with publisher CSS.

Co-authored-by: Cursor <cursoragent@cursor.com>
twitter: creator is always a handle; default author() already strips @
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@Kikobeats
Kikobeats marked this pull request as ready for review August 17, 2026 17:13
@coveralls

coveralls commented Aug 17, 2026 •

Copy link
Copy Markdown
Collaborator

Coverage Status

Coverage is 94.746% — fix/author-ui-chrome into master. No base build found for master.

@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown

Caution

CodeRabbit couldn't update its existing comment. The review summary may be out of date.

Error details
No server is currently available to service your request. Sorry about that. Please try resubmitting your request and contact us if the problem persists.

@Kikobeats Kikobeats changed the title fix(author): skip UI chrome, keep real bylines fix(author): fall back to twitter:creator Aug 17, 2026
Kikobeats and others added 3 commits August 17, 2026 19:17
logo-favicon only accepts ico/png; this fixture's icons are jpg

Co-authored-by: Cursor <cursoragent@cursor.com>
Pin jewish-business-news to the HTML logo instead of a
network-dependent favicon fallback.

Co-authored-by: Cursor <cursoragent@cursor.com>
logo-favicon reachability is not deterministic in CI.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Kikobeats
Kikobeats merged commit d1ec557 into master Aug 17, 2026
60 checks passed
@Kikobeats
Kikobeats deleted the fix/author-ui-chrome branch August 17, 2026 17:39
markharding pushed a commit to futo-org/Harbor that referenced this pull request Oct 13, 2026
This PR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [metascraper](https://metascraper.js.org) ([source](https://github.com/microlinkhq/metascraper)) | [`5.51.1` → `5.58.4`](https://renovatebot.com/diffs/npm/metascraper/5.51.1/5.58.4) | ![age](https://developer.mend.io/api/mc/badges/age/npm/metascraper/5.58.4?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/metascraper/5.51.1/5.58.4?slim=true) |

---

### Release Notes

<details>
<summary>microlinkhq/metascraper (metascraper)</summary>

### [`v5.58.4`](https://github.com/microlinkhq/metascraper/blob/HEAD/CHANGELOG.md#5584-2026-10-09)

[Compare Source](microlinkhq/metascraper@v5.58.1...v5.58.4)

**Note:** Version bump only for package metascraper

### [`v5.58.1`](https://github.com/microlinkhq/metascraper/blob/HEAD/CHANGELOG.md#5581-2026-09-17)

[Compare Source](microlinkhq/metascraper@v5.56.2...v5.58.1)

##### Bug Fixes

- **metascraper-instagram:** prefer 180px apple-touch logo ([#&#8203;882](microlinkhq/metascraper#882)) ([a586af5](microlinkhq/metascraper@a586af5))
- use [@&#8203;kikobeats/got](https://github.com/kikobeats/got) to support Node.js 24.20 ([#&#8203;881](microlinkhq/metascraper#881)) ([41a626b](microlinkhq/metascraper@41a626b)), closes [nodejs/node#64847](nodejs/node#64847)

### [`v5.56.2`](https://github.com/microlinkhq/metascraper/blob/HEAD/CHANGELOG.md#5570-2026-08-19)

[Compare Source](microlinkhq/metascraper@v5.56.1...v5.56.2)

##### Features

- add metascraper-imdb ([#&#8203;876](microlinkhq/metascraper#876)) ([b10eabb](microlinkhq/metascraper@b10eabb))

#### [5.56.2](microlinkhq/metascraper@v5.56.1...v5.56.2) (2026-08-17)

**Note:** Version bump only for package metascraper

#### [5.56.1](microlinkhq/metascraper@v5.56.0...v5.56.1) (2026-08-17)

##### Bug Fixes

- **author:** fall back to twitter:creator ([#&#8203;874](microlinkhq/metascraper#874)) ([d1ec557](microlinkhq/metascraper@d1ec557)), closes [#author-group](https://github.com/microlinkhq/metascraper/issues/author-group) [#author-group](https://github.com/microlinkhq/metascraper/issues/author-group)

### [`v5.56.1`](https://github.com/microlinkhq/metascraper/blob/HEAD/CHANGELOG.md#5570-2026-08-19)

[Compare Source](microlinkhq/metascraper@v5.55.2...v5.56.1)

##### Features

- add metascraper-imdb ([#&#8203;876](microlinkhq/metascraper#876)) ([b10eabb](microlinkhq/metascraper@b10eabb))

#### [5.56.2](microlinkhq/metascraper@v5.56.1...v5.56.2) (2026-08-17)

**Note:** Version bump only for package metascraper

#### [5.56.1](microlinkhq/metascraper@v5.56.0...v5.56.1) (2026-08-17)

##### Bug Fixes

- **author:** fall back to twitter:creator ([#&#8203;874](microlinkhq/metascraper#874)) ([d1ec557](microlinkhq/metascraper@d1ec557)), closes [#author-group](https://github.com/microlinkhq/metascraper/issues/author-group) [#author-group](https://github.com/microlinkhq/metascraper/issues/author-group)

### [`v5.55.2`](https://github.com/microlinkhq/metascraper/blob/HEAD/CHANGELOG.md#5560-2026-08-15)

[Compare Source](microlinkhq/metascraper@v5.55.1...v5.55.2)

##### Features

- add metascraper-citation ([#&#8203;873](microlinkhq/metascraper#873)) ([31bceb1](microlinkhq/metascraper@31bceb1))

#### [5.55.2](microlinkhq/metascraper@v5.55.1...v5.55.2) (2026-08-13)

##### Bug Fixes

- **helpers:** keep CGI + in query strings ([#&#8203;872](microlinkhq/metascraper#872)) ([4743562](microlinkhq/metascraper@4743562))

#### [5.55.1](microlinkhq/metascraper@v5.55.0...v5.55.1) (2026-08-10)

##### Bug Fixes

- **youtube:** date a video by its upload date ([#&#8203;869](microlinkhq/metascraper#869)) ([7040d5c](microlinkhq/metascraper@7040d5c))

### [`v5.55.1`](https://github.com/microlinkhq/metascraper/blob/HEAD/CHANGELOG.md#5560-2026-08-15)

[Compare Source](microlinkhq/metascraper@v5.55.0...v5.55.1)

##### Features

- add metascraper-citation ([#&#8203;873](microlinkhq/metascraper#873)) ([31bceb1](microlinkhq/metascraper@31bceb1))

#### [5.55.2](microlinkhq/metascraper@v5.55.1...v5.55.2) (2026-08-13)

##### Bug Fixes

- **helpers:** keep CGI + in query strings ([#&#8203;872](microlinkhq/metascraper#872)) ([4743562](microlinkhq/metascraper@4743562))

#### [5.55.1](microlinkhq/metascraper@v5.55.0...v5.55.1) (2026-08-10)

##### Bug Fixes

- **youtube:** date a video by its upload date ([#&#8203;869](microlinkhq/metascraper#869)) ([7040d5c](microlinkhq/metascraper@7040d5c))

### [`v5.55.0`](https://github.com/microlinkhq/metascraper/blob/HEAD/CHANGELOG.md#5560-2026-08-15)

[Compare Source](microlinkhq/metascraper@v5.54.1...v5.55.0)

##### Features

- add metascraper-citation ([#&#8203;873](microlinkhq/metascraper#873)) ([31bceb1](microlinkhq/metascraper@31bceb1))

#### [5.55.2](microlinkhq/metascraper@v5.55.1...v5.55.2) (2026-08-13)

##### Bug Fixes

- **helpers:** keep CGI + in query strings ([#&#8203;872](microlinkhq/metascraper#872)) ([4743562](microlinkhq/metascraper@4743562))

#### [5.55.1](microlinkhq/metascraper@v5.55.0...v5.55.1) (2026-08-10)

##### Bug Fixes

- **youtube:** date a video by its upload date ([#&#8203;869](microlinkhq/metascraper#869)) ([7040d5c](microlinkhq/metascraper@7040d5c))

### [`v5.54.1`](https://github.com/microlinkhq/metascraper/blob/HEAD/CHANGELOG.md#5550-2026-08-09)

[Compare Source](microlinkhq/metascraper@v5.54.0...v5.54.1)

##### Features

- **helpers:** pass propName to validate ([#&#8203;868](microlinkhq/metascraper#868)) ([8e0a75f](microlinkhq/metascraper@8e0a75f))

#### [5.54.1](microlinkhq/metascraper@v5.54.0...v5.54.1) (2026-08-07)

**Note:** Version bump only for package metascraper

### [`v5.54.0`](https://github.com/microlinkhq/metascraper/blob/HEAD/CHANGELOG.md#5550-2026-08-09)

[Compare Source](microlinkhq/metascraper@v5.53.0...v5.54.0)

##### Features

- **helpers:** pass propName to validate ([#&#8203;868](microlinkhq/metascraper#868)) ([8e0a75f](microlinkhq/metascraper@8e0a75f))

#### [5.54.1](microlinkhq/metascraper@v5.54.0...v5.54.1) (2026-08-07)

**Note:** Version bump only for package metascraper

### [`v5.53.0`](https://github.com/microlinkhq/metascraper/blob/HEAD/CHANGELOG.md#5540-2026-08-07)

[Compare Source](microlinkhq/metascraper@v5.52.1...v5.53.0)

##### Features

- **helpers:** add rule-level validate (like test) ([#&#8203;866](microlinkhq/metascraper#866)) ([d40856b](microlinkhq/metascraper@d40856b))

#### [5.53.1](microlinkhq/metascraper@v5.53.0...v5.53.1) (2026-08-02)

##### Bug Fixes

- keep the favicon body under reachable-url v2 ([#&#8203;865](microlinkhq/metascraper#865)) ([ce4536f](microlinkhq/metascraper@ce4536f))

### [`v5.52.1`](https://github.com/microlinkhq/metascraper/blob/HEAD/CHANGELOG.md#5530-2026-07-30)

[Compare Source](microlinkhq/metascraper@v5.52.0...v5.52.1)

##### Features

- **helpers:** read the declared protocol instead of resolving it ([#&#8203;864](microlinkhq/metascraper#864)) ([2d72298](microlinkhq/metascraper@2d72298))

#### [5.52.1](microlinkhq/metascraper@v5.52.0...v5.52.1) (2026-07-29)

**Note:** Version bump only for package metascraper

### [`v5.52.0`](https://github.com/microlinkhq/metascraper/blob/HEAD/CHANGELOG.md#5530-2026-07-30)

[Compare Source](microlinkhq/metascraper@v5.51.1...v5.52.0)

##### Features

- **helpers:** read the declared protocol instead of resolving it ([#&#8203;864](microlinkhq/metascraper#864)) ([2d72298](microlinkhq/metascraper@2d72298))

#### [5.52.1](microlinkhq/metascraper@v5.52.0...v5.52.1) (2026-07-29)

**Note:** Version bump only for package metascraper

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - "before 9am on tuesday"
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMzMuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjEzMy4wIiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZSJdfQ==-->

Reviewed-on: https://code.futo.org/harbor/harbor/pulls/1815
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.

2 participants