我尝试使用BeautifulSoup4和请求来获取数据的xml页面,但是我似乎无法打印结果。我没有收到错误,但是没有数据被打印出来。在
import time
import requests
from bs4 import BeautifulSoup
url = "website.com?xml=1"
result = requests.get(url)
content = result.content
soup = BeautifulSoup(content, "html.parser")
steamID = soup.find_all("x")
print (y)
您应该使用xml解析器:
相关问题 更多 >
编程相关推荐