import json import switch_client import todo from extractors.xe_page import fetch_tables PATH = "/Clock_Detail.html" def get_clock(session) -> dict: """Returns {"Current Time": record, "Time Zone": record, "Daylight Saving Time": record}.""" tables = fetch_tables(session, PATH) return {caption: table["record"] for caption, table in tables.items()} if __name__ == "__main__": session = switch_client.get_session() print(json.dumps(get_clock(session), indent=2)) todo.mark_implemented(switch_client.BASE_URL + PATH)