There is a date and time, dynamic, updated on the site constantly. I get their parser through xpath. How now is the resulting value compared with the current date and time, and if the current time is more than 5 minutes for example. That performs for example print. In general, the essence of the task, the hardware parser, which is constantly monitored and displayed on html in the form of time and date.
import requests import datetime from lxml import html response = requests.get('URL') parsed_body = html.fromstring(response.text) a = 'hostname' now = datetime.datetime.now() now1 = now.strftime("%d.%m.%Y %H:%M:%S") b = (str(parsed_body.xpath('/html/body/table/tbody/tr[001]/td[1]/text()'))) c = (str(parsed_body.xpath('/html/body/table/tbody/tr[001]/td[2]/text()'))) print(a + b + c)