import requests

# OMDB and similar services use &t= for title and often need an API key
# Sign up at omdbapi.com for a free key, then paste it below
API_KEY = "your_key_here"
title = "Harry Potter"

params = {"t": title, "apikey": API_KEY}
response = requests.get("http://www.omdbapi.com/", params=params, timeout=10)

if response.status_code == 200:
    movie = response.json()
    if movie.get("Response") == "True":
        print(movie["Title"], "(", movie["Year"], ")")
        print("Plot:", movie["Plot"][:80], "...")
    else:
        print("Movie not found:", movie.get("Error"))
