from llama_index.readers import SimpleWebPageReader loader = SimpleWebPageReader() documents = loader.load_data(urls=urls)
def is_url_reachable(url): try: response = requests.head(url) return response.status_code == 200 except requests.RequestException: return False