BeautifulSoup1 [Python] BeautifulSoup 라이브러리 BeautifulSoup는 HTML과 XML file들의 data를 가져오는 python 라이브러리이다. 이는 parser를 이용해 html, xml file들의 정보를 쉽게 추출할 수 있도록 도와준다. 더보기 더보기 parsing은 구문분석을 하는 것을 의미한다. 예를 들어 html parse는 html 문법 규칙에 따른 문자열을 해당 문법규칙을 바탕으로 단어의 의미나 구조를 분석하는 것이다. html parse를 행하는 프로그램을 일컬어 html parser라고 한다. 1. making the soup from bs4 import BeautifulSoup with open("index.html") as fp: soup = BeautifulSoup(fp, 'html.parser') soup = Beau.. 2022. 1. 14. 이전 1 다음