추가 '복붙'

This commit is contained in:
kim_yubin 2018-11-16 19:07:55 +09:00
parent 07b125bc2b
commit 6ccc22f2cb
1 changed files with 11 additions and 0 deletions

11
복붙 Normal file
View File

@ -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