I am trying to take the output of the web scrap and put it in a 1 txt file but it gives me an error saying
'charmap' codec can't encode character '\u200a' in position 23130: character maps to <undefined>
File "C:\Users\Web scrapper.py", line 12, in <module>
f.write(y)
from urllib.request import urlopen
from bs4 import BeautifulSoup
import pyperclip
x = input("Link you want to scrap from:")
url = x
page = urlopen(url)
html = page.read().decode("utf-8")
soup = BeautifulSoup(html, "html.parser")
y = str(soup.get_text())
print(y)
with open('Dogs.txt', 'w') as f:
f.write(y)