import requests
import random
import urllib.request
from bs4 import BeautifulSoup


page_url = 'http://picrelated.com/'


def Core_spider(url):
source_code = requests.get(url)
plain_text = source_code.text
soup = BeautifulSoup(plain_text, "html.parser")
for link in soup.find_all('a', {'class': 'text-decoration-none list-item-desc-title'}):
   href = link.get('href')
   get_single_item_data(href)


def get_single_item_data(item_url):
source_code = requests.get(item_url)
plain_text = source_code.text
soup = BeautifulSoup(plain_text, 'html.parser')
for image in soup.find_all('img', {'data-load': 'full'}):
    image_url = image.get('src')
    print(image_url)
    download_image(image_url)


def download_image(image_link):
image_name = random.randrange(1, 1000)
full_name = str(image_name) + 'jpg'
urllib.request.urlretrieve(image_link, full_name)

Core_spider(page_url)

This code gives the image url but fails to download the File..is there anything that i'm missing out..Can anyone point out the error?