import requests
from bs4 import BeautifulSoup  # BeautifulSoup import

def reple(url):
    repleText = requests.get('https://movie.naver.com' + url).text
    soup = BeautifulSoup(repleText, 'html.parser')
    print('[리플]')
    for tag in soup.select('div[class=score_reple]'):
        rep = tag.select('p').pop(0).text.strip()
        print(rep)

response = requests.get('https://movie.naver.com/movie/sdb/rank/rmovie.nhn')
html = response.text
soup = BeautifulSoup(html, 'html.parser')  # html.parser를 사용해서 soup에 넣겠다
ranking = 1
for tag in soup.select('div[class=tit3]'):
    url = tag.find('a').get('href')
    print(url)
    print("\n" + str(ranking) + '위 : ' + tag.text.strip())
    reple(url)
    ranking = ranking + 1