import os import hashlib import re import base64 import zipfile from urllib.parse import urljoin, urlparse, unquote from urllib.request import urlopen, Request from bs4 import BeautifulSoup import gradio as gr def remove_comments(text): # Remove HTML comments text = re.sub(r'', '', text) # Remove CSS comments (both block and inline) text = re.sub(r'/\*[\s\S]*?\*/|//.*', '', text) # Remove JavaScript comments (both block and inline) text = re.sub(r'/\*[\s\S]*?\*/|//.*?\n', '', text) return text # Function to fetch HTML from a URL and extract all CSS def save_css(style_tag): try: # Extract all