python/python_selenium
Selenium 활용2
import requests from bs4 import BeautifulSoup header = {'User-Agent':("Mozilla/5.0 (Windows NT 10.0; Win64; x64) " "AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36") ,"Accept-Language":"ko-KR,ko"} # 한글 언어 웹페이지를 불러옴 url = "" res = requests.get(url, headers=header) res.raise_for_status() soup = BeautifulSoup(res.text, "lxml") # with open("movie.html", "w", encoding="utf8") as..
2023. 4. 29. 01:45