from bs4 import BeautifulSoup
import requests

path = 'datas/sample02.html'

with open(path) as fp:
    soup = BeautifulSoup(fp, features='lxml')
    print(type(soup.title), soup.title)
    print(type(soup.title.string), soup.title.string)
    print(type(soup.p), soup.p)
    print(type(soup.p['class'], soup.p['class']))