Repository navigation
ficbook credits only authors and co-authors - #6
Merged
Merged
Conversation
The author list took every /authors/ link on the page: the beta from the work header and reward givers rendered inside it ended up in the file name and the EPUB metadata. Names now come from the role badges (author, co-author), with itemprop="author" as the fallback. Checked against live pages on 2026-10-17. Closes #2 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On a translation the badges read translator and co-translator, so the co-translator fell through to the itemprop fallback and was dropped. The three-name cap goes: the selection is exact now. Tests cover translations, the no-badge fallback and rewards in their live shape. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The ficbook adapter took every
/authors/link on the page as an author. Two kinds of people leaked into the file name and the EPUB/FB2 metadata:<fanfic-rewards>renders inside the work header (.fanfic-hat), and each giver is an/authors/link. That is the case from ficbook: commenters from the rewards sidebar end up among the book's authors #2 (ficbook.net/readfic/7562115).Now the names come from the role badges in the header: a badge reading автор, соавтор, переводчик or сопереводчик credits the link in its own block. The three-name cap is gone: the selection is exact. If there are no badges,
a[itemprop="author"]is the fallback. Co-authors cannot rely onitemprop, because ficbook marks only the main author with it.Checked:
a.reward-giver-namein the header aside). It fails on the old code with"Автор, Дарительница, Читатель", which is the reported bug.npm run checkpasses: typecheck, build and 26 + 20 + 35 tests.Closes #2
🤖 Generated with Claude Code