diff --git a/복붙 b/복붙 new file mode 100644 index 0000000..0b88148 --- /dev/null +++ b/복붙 @@ -0,0 +1,11 @@ +import requests +from bs4 import BeautifulSoup + +response = requests.get('https://movie.naver.com/movie/sdb/rank/rmoive.nhm') +html = response.text +soup = BeautifulSoup(html, 'html.parser') +ranking=1 +for tag in soup.select('div[class=tit3]'): + url = tag.get('href') + print("\n" + str(ranking) + '위 : ' + tag.text.strip()) + ranking = ranking + 1 \ No newline at end of file