from bs4 import BeautifulSoup
html = '''
<html>
<head>
<title>BeautifulSoup test</title>
</head>
<body>
<div id='upper' class='test' custom='good'>
<h3 class='test2' title='Good Content Title'>Contents Title</h3>
<p>Test contents</p>
<h4>TEST</h4>
</div>
<div id='lower' class='test' custom='nice'>
<p>Test Test Test 1</p>
<p>Test Test Test 2</p>
<p>Test Test Test 3</p>
</div>
</body>
</html>'''
soup = BeautifulSoup(html)
soup.find('h3')
soup.find('div')
soup.find('div', id='lower')
soup.find('div', class_='test')
attrs = { 'id': 'upper', 'class': 'test' }
attrs2 = {"class": "btn btn_view", "data-clk": "sug.cxlink", "target": "_blank"}
soup.find('div', attrs=attrs)
soup.find_all('div', class_='test')
tag = soup.find('h3')
print(tag)
tag.get_text()
tag = soup.find('p')
print(tag)
tag.get_text()
tag = soup.find('div', id='upper')
print(tag)
tag.get_text()
type(tag)
tag = soup.find('h3')
print(tag)
tag['title']