File size: 320 Bytes
4ff79c6 | 1 2 3 4 5 6 7 8 9 10 11 12 | # SPDX-FileCopyrightText: 2022-present deepset GmbH <info@deepset.ai>
#
# SPDX-License-Identifier: Apache-2.0
from urllib.parse import urlparse
def is_valid_http_url(url: str) -> bool:
"""Check if a URL is a valid HTTP/HTTPS URL."""
r = urlparse(url)
return all([r.scheme in ["http", "https"], r.netloc])
|