response.content 와 response.text 의 차이
.content : in bytes
.text : in unicode


webdriver로 page source 가져오기
soup = BeautifulSoup(page_driver.page_source, 'lxml')

list의 내용을 다 지울때 clear() 함수 사용

Beautifulsoup에서 tag가 특정 attribute를 갖고 있는지 확인하는 함수
tag_name.has_attr(‘attribute_name’)
없는지 확인하려면 not tag_name.has_attr(‘attribute_name’) 처럼 not을 붙여 사용

Beautifulsoap object를 이용해 문서에서 attribute의 값을 가져올때,
<p>
Back to the
<a rel="index">
homepage
</a>
</p>
위 문서에서 soup.a[‘rel’] 형태로 값 ‘index’을 가져온다.

webdriver를 context manager로 사용하면 실행이 끝나고 브라우저도 닽혀진다.
