I have the following code:
for item in soup.select('.profile-detail'):
f= open('htmlfile.html', 'w')
f.write(item)
f.close()
I want to write items into "htmlfile.html" but it's giving me the error:
TypeError: write() argument must be str, not Tag