import os
import requests
from bs4 import BeautifulSoup
from urllib.parse import urljoin

# set the URL of the webpage to download
url = "https://shenkx.co.uk/deksneakpeak.html"

# make a GET request to the URL
response = requests.get(url)

# parse the HTML content of the page with BeautifulSoup
soup = BeautifulSoup(response.content, "html.parser")

# find all the <img> tags on the page
img_tags = soup.find_all("img")

# create a folder to store the images
if not os.path.exists("images"):
    os.makedirs("images")

# download each image and save it to the "images" folder
for img_tag in img_tags:
    # get the URL of the image
    img_url = urljoin(url, img_tag["src"])

    # make a GET request to the image URL
    img_response = requests.get(img_url)

    # get the filename of the image
    img_filename = img_url.split("/")[-1]

    # save the image to the "images" folder
    with open(os.path.join("images", img_filename), "wb") as f:
        f.write(img_response.content)

print("All images downloaded!")