Skip to content

fix: add kind code fallback for legal_status extraction#80

Merged
sonesuke merged 1 commit intomainfrom
fix/legal-status-fallback
Apr 5, 2026
Merged

fix: add kind code fallback for legal_status extraction#80
sonesuke merged 1 commit intomainfrom
fix/legal-status-fallback

Conversation

@sonesuke
Copy link
Copy Markdown
Owner

@sonesuke sonesuke commented Apr 5, 2026

Summary

  • Add kind code-based fallback for legal_status when DOM extraction methods fail
  • Patent IDs with kind code A* (e.g., A1, A2) → "Pending", B* (e.g., B1, B2) → "Active"

Context

Google Patents HTML structure changes cause the existing 3 DOM extraction methods to fail, resulting in legal_status always being null. This adds a lightweight fallback using the patent ID kind code already available in the URL.

Note: Precise statuses like "Expired" or "Withdrawn" still require DOM extraction from patent office databases.

Test plan

  • cargo fmt --check passes
  • cargo clippy -D warnings passes
  • cargo test passes

🤖 Generated with Claude Code

When DOM-based legal_status extraction fails, derive status from
the patent ID kind code: A* → Pending, B* → Active.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sonesuke sonesuke merged commit 5061090 into main Apr 5, 2026
4 checks passed
@sonesuke sonesuke deleted the fix/legal-status-fallback branch April 5, 2026 22:48
@sonesuke sonesuke mentioned this pull request Apr 5, 2026
1 task
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