from bs4 import BeautifulSoup
from urllib.request import urlopen
response = urlopen('https://www.naver.com/')
soup = BeautifulSoup(response, 'html.parser')
for anchor in soup.select("span.ah_k"):
print(anchor)
I'm studying crawl, but the real-time search word on Naver should be crawled in this section, but nothing comes out even if I run it I would appreciate it if you could tell me a solution why!
python beautifulsoup
Hello! It is difficult for beginners (like me) to understand, so I organize them easily. I couldn't do this either, so I asked my developer friend and he said that only Naver's real-time data has been changed dynamically since January 16, 2020.
As a result, the difficulty level has increased considerably because we have to use selenium instead of request.
Note 1: https://okky.kr/article/671076 Note 2: https://khu.goorm.io/qna/5216
© 2024 OneMinuteCode. All rights reserved.