from pathlib import Path t = Path("_tmp_hub_login.html").read_text(encoding="utf-8", errors="replace") for s in ["otantik-hub", "10.8.192", "83.147", "woHotspotLite", "styles/", "z="]: print(s, t.count(s))