def archive_stream_url(site_url, html_root, sanitized_stream_name): """ http://127.0.0.1:4000/archive/stream/213222-general/index.html """ base_url = urllib.parse.urljoin(site_url, html_root) return f"{base_url}/stream/{sanitized_stream_name}/index.html"