네이버 실시간검색순위에 대한 python의 크롤링 코드입니다.
import requests
from bs4 import BeautifulSoup
headers = {'User-Agent':'Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36'}
html = requests.get('https://datalab.naver.com/keyword/realtimeList.naver?where=main', headers = headers)
parsed = BeautifulSoup(html.content, 'html.parser')
data1 = parsed.findAll('span', 'item_title')
for idx, item in enumerate(data1, 1):
print(idx, item.get_text())
'컴퓨터' 카테고리의 다른 글
LG의 차세대 스마트폰 윙 (0) | 2020.08.31 |
---|---|
포토샵 자동저장, 일러스트 자동저장, 오토캐드 자동저장 프로그램 (0) | 2020.08.27 |