import requests
from bs4 import BeautifulSoup
def search_free_templates():
url = "https://example.com/templates" # Replace with the actual URL or preferred website(s) offering free templates
try:
response = requests.get(url)
if response.status_code == 200:
soup = BeautifulSoup(response.content, "html.parser")
template_links = soup.find_all("a", class_="template-link")
for link in template_links:
print(f"Template: {link.text}\nURL: {link['href']}\n")
else:
print("Unable to retrieve templates.")
except requests.exceptions.RequestException:
print("An error occurred while making the request.")
search_free_templates()