import requests
from bs4 import BeautifulSoup

def scan_website(url):
    try:
        response = requests.get(url)
        soup = BeautifulSoup(response.text, 'html.parser')
        
        # Example scan - look for script tags (basic XSS check)
        xss_found = bool(soup.find_all('script'))

        result = "Potential XSS detected!" if xss_found else "No issues found."
        return {"url": url, "result": result}
    except Exception as e:
        return {"url": url, "error": str(e)}
