INNER CODE UNIT · Python
__init__
witchan/ios-mcp · scripts/submit_bigboss_update.py:29
def __init__(self, form_id: str) -> None:
super().__init__()
self.form_id = form_id
self.in_form = False
self.form_seen = False
self.action = ""
self.method = "post"
self.hidden_fields: dict[str, str] = {}
def handle_starttag(self, tag: str, attrs: list[tuple[str, str | None]]) -> None:
attr = {key: (value or "") for key, value in attrs}
if tag.lower() == "form" and attr.get("id") == self.form_id:
self.in_form = True
self.form_seen = True
self.action = attr.get("action", "")
self.method = attr.get("method", "post").lower()
return