작성
·
222
0
import requests
from bs4 import BeautifulSoup
url = "https://naver.com"
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
}
req = requests.get(url, headers=headers)
html = req.text
soup = BeautifulSoup(html, "html.parser")
print(soup.title)
에쿠 감사합니다.
오늘 다시 해보니 되네요. ^^
좋은 주말 되세요