beatifulsoup (1) 썸네일형 리스트형 chicago analysis # 선요약 1. beautiful soup를 사용하여 웹크롤링을 할 수 있다. url를 읽어서 html 정보를 받으면 find, find_all로 element에 접근 가능하다. 2. tqdm으로 진행 상태를 확인할 수 있다. beautiful soup 사용하여 웹크롤링하는 예제 from bs4 import BeautifulSoup page = open('./data/test_html.html', 'r').read() soup = BeautifulSoup(page, 'html.parser') (soup.prettify()) #들여쓰기로 보기좋게 출력 (list(soup.children)) #soup는 문서전체 html = (list(soup.children)[2]) #html 태그 안 (list(html.. 이전 1 다음