Skip to content

Add SI detail page scraping (structured register content)#39

Open
philipp-gecko wants to merge 1 commit intobundesAPI:mainfrom
Gecko2AI:upstream-pr
Open

Add SI detail page scraping (structured register content)#39
philipp-gecko wants to merge 1 commit intobundesAPI:mainfrom
Gecko2AI:upstream-pr

Conversation

@philipp-gecko
Copy link

Summary

  • Adds --detail / -det CLI flag that fetches the SI (Strukturierter Registerinhalt) XJustiz XML document for the first search result
  • Parses the XML into structured fields: company name, address, legal form, share capital, directors, prokura holders, business purpose, representation rules, and register entry history
  • Works with both text and JSON (-j) output modes
  • No new dependencies — uses stdlib xml.etree.ElementTree

Example

$ python handelsregister.py -s "Gecko Two GmbH" -so exact --detail -f

name: Gecko Two GmbH
court: Saxony   District court Leipzig HRB 32007
...

--- Detail (SI) ---
Name: Gecko Two GmbH
Legal Form: Gesellschaft mit beschränkter Haftung (GmbH)
Address: Ritterstraße 42, 04109 Leipzig
Capital: 35333.00 EUR
Directors:
  Christopher Siebenhüner (einzelvertretungsberechtigt)
Prokura:
  Peter Schlangen (Einzelprokura)
  Tom Potutschek (Einzelprokura)
...

Test plan

  • Unit test test_parse_si_detail — parses XJustiz XML fixture (no network)
  • Integration test test_fetch_detail — searches "Gecko Two GmbH" and verifies SI fields
  • Existing tests pass without modification (added detail=False to argparse Namespace)
  • --detail flag is opt-in, no behavior change without it

🤖 Generated with Claude Code

Extends the CLI to fetch the XJustiz XML document from the Handelsregister
portal, parsing company details including address, legal form, share capital,
managing directors, prokura holders, business purpose, and register entries.

New --detail / -det flag fetches SI data for the first search result.
Both text and JSON (-j) output modes include the enriched data.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant