hc99's picture
Add files using upload-large-folder tool
4ff79c6 verified
# 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])