当我运行给定的代码时
import requests
import xml.etree.ElementTree as ET
u1=input("Enter URL of the first source :")
resp=requests.get(u1)
with open ('1.xml','wb') as f1:
f1.write(resp.content)
tree = ET.parse('1.xml')
root = tree.getroot()
出现以下错误:
Traceback (most recent call last):
File "pro.py", line 18, in <module>
tree = ET.parse('1.xml')
File "/usr/lib/python3.6/xml/etree/ElementTree.py", line 1196, in parse
tree.parse(source, parser)
File "/usr/lib/python3.6/xml/etree/ElementTree.py", line 597, in parse
self._root = parser._parse_whole(source)
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 35, column 231
谁能告诉我这段代码有什么问题吗?
bruh这个狗屎,你们都不知道该如何在mofk中编码