```
import requests
from bs4 import BeautifulSoup

# Specify the URL
url = 'https://www.nytimes.com/'

# Make the request
response = requests.get(url)

# Parse the html content
soup = BeautifulSoup(response.content, 'html.parser')

# Find all headlines
headlines = soup.find_all('h2', class_='esl82me0')

# Print the top 5 headlines
print('Top 5 Headlines from The New York Times:')
for head in headlines[:5]:
    print(head.text)
```
URL: https://www.nytimes.com/
Scrivi un programma Python per recuperare i primi 5 titoli da una determinata pagina di notizie.