このエラーがわかりません。「コンテンツ」を書き込み可能にするにはどうすればよいですか?
from bs4 import BeautifulSoup
soup = BeautifulSoup(open("http://www.asdf.fi/asdf.html"))
content = soup.find(id="content")
with open("test.html", "a") as myfile:
myfile.write(content)
エラー:
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
TypeError: expected a character buffer object