我试图以这种方式从URL加载html标记,然后运行一些xpath查询,但是页面源加载了BOM,如何在运行xpath之前删除它们?
session = requests.Session()
page = session.get(url)
page_data = lxml.html.fromstring(page.text)
输出:
u'Re\ufeffverse \ufeffFleece \ufeffHoo\ufeffded S\ufeffwea\ufefftshi\ufeffrt'
答案 0 :(得分:0)
http://myEndpoint?myParam1=10&myParam2=hello