AttributeError: 'xml.etree.ElementTree.Element' object has no attribute 'encode'
问题 I'm trying to make a desktop notifier, and for that I'm scraping news from a site. When I run the program, I get the following error. news[child.tag] = child.encode('utf8') AttributeError: 'xml.etree.ElementTree.Element' object has no attribute 'encode' How do I resolve it? I'm completely new to this. I tried searching for solutions, but none of them worked for me. Here is my code: import requests import xml.etree.ElementTree as ET # url of news rss feed RSS_FEED_URL = "http://www