Good people, tell me, please) I am a beginner, I ask you not to throw stones at me)) I want to parse the site, I ran into two problems at the same time, I am following the example of YouTube
but I get an error from encoding and I can’t understand whether the prettify () method works or not, but it seems not. With this code, this error
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import urllib.request from bs4 import BeautifulSoup import csv def get_html(url): response = urllib.request.urlopen(url) return response.read() def parse(html): soup = BeautifulSoup(html, 'html.parser') div = soup.find('div', class_='col-md-8 col-left') print(div.prettify()) def main(): parse(get_html('сайт')) if __name__ == '__main__': main() #!/usr/bin/env python3 # -*- coding: utf-8 -*- import urllib.request from bs4 import BeautifulSoup import csv def get_html(url): response = urllib.request.urlopen(url) return response.read() def parse(html): soup = BeautifulSoup(html, 'html.parser') div = soup.find('div', class_='col-md-8 col-left', encoding='utf-8') print(div.prettify()) def main(): parse(get_html('тот же')) if __name__ == '__main__': main() then it gives an error like this: 
Actually the question, adding encoding on line 17, did I correct the encoding error? And if so, then the second question is why the prettify () method does not work? I did print (parse (get_html ('link to the site'))) in maine without this method and in response the program gave out None The question is where did I get it?)) Sorry that the question is probably stupid, but still)) Thanks!)
