import requests # TODO add error handling logic for request def count_words(url): response = requests.get(url, timeout=5) word_count = len(response.text.split(" ")) print(f"There are {word_count} words in {url}") return word_count