import requests from bs4 import BeautifulSoup def check_li_tags(url): try: # Fetch the page response = requests.get(url) response.raise_for_status() # Raise an error for bad responses (4xx, 5xx) # Parse the HTML soup = BeautifulSoup(response.text, "lxml") # Find all