I have a script that records a span field on a website using the requests module in python.
from lxml import html
import requests
r = requests.get(url)
tree = html.fromstring(r.content)
while 1:
print str(tree.xpath('//span[@id="ofr"]/text()')
However this span is updating and I am looking to refresh this without reloading the entire page, for which I cannot find a solution. Many thanks