import requests import os # Define the URL of the webpage url = "https://pl.wikipedia.org/wiki/Bateria_3R12" # Define the output file path output_file = os.path.expanduser("~/Desktop/Bateria_3R12.html") # Download the webpage as an HTML file response = requests.get(url) with open(output_file, "wb") as f: f.write(response.content) # Notify the user print(f"Webpage downloaded and saved to {output_file}")