INNER CODE UNIT · Python

handle_starttag

witchan/ios-mcp · scripts/submit_bigboss_update.py:38

    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

        if not self.in_form or tag.lower() != "input":
            return

        if attr.get("type", "text").lower() == "hidden" and attr.get("name"):
            self.hidden_fields[attr["name"]] = attr.get("value", "")

    def handle_endtag(self, tag: str) -> None:
        if self.in_form and tag.lower() == "form":
            self.in_form = False

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…