import requests
import fake_useragent
from bs4 import BeautifulSoup
link = "https://amirowrafael.ru/marat-guliya"
image_number = 0
response = requests.get(link).text
soup = BeautifulSoup(response, 'lxml')
block = soup.find('div', class_= 'row')
all_image = block.find_all('div',class_='piece')
index = 0
for image in all_image:
image_link = image.find('a').get('href')
image_bites = requests.get(image_link).content
with open(f'image{index}.png', 'wb') as file:
file.write(image_bites)
index += 1
print(image_link)