Skip to content

fix(chatgpt): update extractor for changed DOM structure#236

Merged
kepano merged 3 commits intokepano:mainfrom
Barabazs:fix/chatgpt-dom
Apr 13, 2026
Merged

fix(chatgpt): update extractor for changed DOM structure#236
kepano merged 3 commits intokepano:mainfrom
Barabazs:fix/chatgpt-dom

Conversation

@Barabazs
Copy link
Copy Markdown
Contributor

  • Adapt turn selector from article[data-testid] to [data-testid] to handle section-based turn elements
  • Extract prose content (.markdown, .whitespace-pre-wrap) instead of serializing the full turn element, reducing noise
  • Add h4 to sr-only heading selectors to match current ChatGPT markup

ChatGPT changed `article` to `section` for conversation turns
data-message-author-role moved from the turn container to a child
element. Serializing the entire turn included deeply nested wrapper
divs that Defuddle's scoring stripped as UI chrome, producing empty
messages. Target .markdown (assistant) or .whitespace-pre-wrap (user)
instead.
@kepano kepano merged commit 1cf60a6 into kepano:main Apr 13, 2026
@Barabazs Barabazs deleted the fix/chatgpt-dom branch April 14, 2026 05:45
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