Please keep updated: 2024+ best dataset codes/.Json
import requests
from bs4 import BeautifulSoup
import logging

def scrape_website(url):
    try:
        response = requests.get(url)
        response.raise_for_status()
        soup = BeautifulSoup(response.content, 'html.parser')
        return soup.prettify()
    except requests.RequestException as e:
        logging.error(f"Error scraping website {url}: {e}")
        return None