pythonスククロp74
lxmlでスクレイピングするときはopen()を使わなかったので, UnicodeDecodeErrorが出なかったが, BeautifulSoupでは,
with open('index.html', encoding = 'utf-8') as f:
soup = BeautifulSoup(f, 'html.parser')
のようにopen()を使ってhtmlファイルを開きBeautifulSoupオブジェクトを得たので, 上のようにencodingを指定する必要がある.
encodingを指定する癖をなくては.