#----packages:
import requests
from bs4 import BeautifulSoup
#----google search:
movie = input('Enter Movie: ')
#----parse html of page:
url = f'https://www.google.com/search?q={movie} movie cover &tbm=isch'
headers = {'User-Agent': 'Mozilla/5.0'}
html = requests.get(url, headers=headers).text
soup = BeautifulSoup(html, 'html.parser')
#----scrape first image from results:
images = soup.find_all('img')
if images:
first_image = images[1]
image_url = first_image['src']
print('Image URL:', image_url)
else:
print('No image found.')