# -*- coding: utf-8 -*-

import requests
from bs4 import BeautifulSoup





url='https://www.imdb.com/chart/top/?ref_=nv_mv_250'

html = requests.get(url).content
soup=BeautifulSoup(html,"html.parser")


liste=soup.find('tbody',{"class":"lister-list"}).find_all('tr',limit=250)
count=0
for tr in liste:
    title=tr.find("td",{"class":"titleColumn"}).find("a").text
    year=tr.find("td",{"class":"titleColumn"}).find("span").text.strip("()")
    rate=tr.find("td",{"class":"ratingColumn imdbRating"}).find('strong').text
    count+=1
    print(count,"-",title,year,"RATE :",rate)
    
