Scrape Sensor Help

Good Afternoon everyone. I am trying to have an automation kick off based on me being on an active call on my Cisco 7975g IP phone. The phone is registered to my corporate CallManager over a VPN that the phone controls. Based on that I figure there is no way to get the state of the device from CallManager.

What I did find is if I browse to a certain webpage on the phone there is a filed that shows ‘Active’ when I am on a call. Someone over on Reddit pointed out that there is a scaper that I could use to try and trigger based on this field. I however cannot seem to figure out the specific syntax.

Can anyone figure out to complete the sensor?

Here is the page source of the webpage that contains the info I need. there is a field on this page called “Stream Status” I need to be able to capture when it updates to “Active”.

<HTML> <HEAD><META http-equiv="Content-Type" content="text/html; charset=utf-8"><TITLE>Cisco Systems, Inc.</TITLE> </HEAD><BODY bgcolor="#FFFFFF" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF" text="#003031"><TABLE BORDER="1" WIDTH="100%" HEIGHT="100%" CELLSPACING="0" CELLPADDING="0" bordercolor="#003031"><TR> <td WIDTH="200" HEIGHT="100" ALIGN=center><A HREF="http://www.cisco.com"><IMG SRC="/FS/Logo.png"></A></TD><td HEIGHT="50" bgcolor="#003031"><p ALIGN=center><B><font color="#FFFFFF" size="6">Streaming Statistics</FONT></B><p ALIGN=center><B><font color="#FFFFFF" size="4">Cisco Unified IP Phone CP-7975G ( SEPF02572783F06 )</FONT></FONT></B></TD> </TR> <TR><td WIDTH="200" ALIGN=center VALIGN=top bgcolor="#003031"><TABLE BORDER="0" CELLSPACING="10" CELLPADDING="0"><TR> <TD><a href="/CGI/Java/Serviceability?adapter=device.statistics.device">Device Information</A></TD></TR> <TR> <TD><a href="/CGI/Java/Serviceability?adapter=device.statistics.configuration">Network Configuration</A></TD></TR> <TR><TD><B><font color='#FFFFFF'>Network Statistics</FONT></B></TD></TR><TR> <TD>   <a href="/CGI/Java/Serviceability?adapter=device.statistics.ethernet">Ethernet Information</A></TD> </TR><TR><TD>   <a href="/CGI/Java/Serviceability?adapter=device.statistics.port.access">Access</A></TD></TR><TR><TD>   <a href="/CGI/Java/Serviceability?adapter=device.statistics.port.network">Network</A></TD></TR><TR><TD><B><font color='#FFFFFF'>Device Logs</FONT></B></TD></TR><TR> <TD>   <a href="/CGI/Java/Serviceability?adapter=device.statistics.consolelog">Console Logs</A></TD><TR> <TD>   <a href="/CGI/Java/Serviceability?adapter=device.statistics.coredumps">Core Dumps</A></TD><TR> <TD>   <a href="/CGI/Java/Serviceability?adapter=device.settings.status.messages">Status Messages</A></TD></TR> <TR> <TD>   <a href="/CGI/Java/Serviceability?adapter=device.trace.display.alarm">Debug Display</A></TD></TR> <TR><TD><B><font color='#FFFFFF'>Streaming Statistics</FONT></B></TD></TR><TR><TD>   <a href="/CGI/Java/Serviceability?adapter=device.statistics.streaming.0">Stream 1 </A></TD></TR><TR><TD>   <a href="/CGI/Java/Serviceability?adapter=device.statistics.streaming.1">Stream 2 </A></TD></TR><TR><TD>   <a href="/CGI/Java/Serviceability?adapter=device.statistics.streaming.2">Stream 3 </A></TD></TR><TR><TD>   <a href="/CGI/Java/Serviceability?adapter=device.statistics.streaming.3">Stream 4 </A></TD></TR><TR><TD>   <a href="/CGI/Java/Serviceability?adapter=device.statistics.streaming.4">Stream 5 </A></TD></TR></TABLE> </TD> <td VALIGN=top><DIV ALIGN=center> <TABLE BORDER="0" CELLSPACING="10" CELLPADDING="0"><TR><TD><B> Remote Address </B></TD><td width=20></TD><TD><B>172.17.1.250/28956</B></TD></TR><TR><TD><B> Local Address</B></TD><td width=20></TD><TD><B>172.19.250.120/22666</B></TD></TR><TR><TD><B> Start Time</B></TD><td width=20></TD><TD><B>2:31:06p</B></TD></TR><TR><TD><B> Stream Status</B></TD><td width=20></TD><TD><B> Active</B></TD></TR><TR><TD><B> Host Name</B></TD><td width=20></TD><TD><B>SEPF02572783F06</B></TD></TR><TR><TD><B> Sender Packets</B></TD><td width=20></TD><TD><B>0</B></TD></TR><TR><TD><B> Sender Octets</B></TD><td width=20></TD><TD><B>0</B></TD></TR><TR><TD><B> Sender Codec</B></TD><td width=20></TD><TD><B>None</B></TD></TR><TR><TD><B> Sender Reports Sent</B></TD><td width=20></TD><TD><B>0</B></TD></TR><TR><TD><B> Sender Report Time Sent</B></TD><td width=20></TD><TD><B>00:00:00</B></TD></TR><TR><TD><B> Rcvr Lost Packets</B></TD><td width=20></TD><TD><B>1</B></TD></TR><TR><TD><B> Avg Jitter</B></TD><td width=20></TD><TD><B>9</B></TD></TR><TR><TD><B> Rcvr Codec</B></TD><td width=20></TD><TD><B>Lin16K</B></TD></TR><TR><TD><B> Rcvr Reports Sent</B></TD><td width=20></TD><TD><B>0</B></TD></TR><TR><TD><B> Rcvr Report Time Sent</B></TD><td width=20></TD><TD><B>00:00:00</B></TD></TR><TR><TD><B> Rcvr Packets</B></TD><td width=20></TD><TD><B>198</B></TD></TR><TR><TD><B> Rcvr Octets</B></TD><td width=20></TD><TD><B>129096</B></TD></TR><TR><TD><B> MOS LQK</B></TD><td width=20></TD><TD><B>0.0000</B></TD></TR><TR><TD><B> Avg MOS LQK</B></TD><td width=20></TD><TD><B>0.0000</B></TD></TR><TR><TD><B> Min MOS LQK</B></TD><td width=20></TD><TD><B>0.0000</B></TD></TR><TR><TD><B> Max MOS LQK</B></TD><td width=20></TD><TD><B>0.0000</B></TD></TR><TR><TD><B> MOS LQK Version</B></TD><td width=20></TD><TD><B>0.95</B></TD></TR><TR><TD><B> Cumulative Conceal Ratio</B></TD><td width=20></TD><TD><B>0.0000</B></TD></TR><TR><TD><B> Interval Conceal Ratio</B></TD><td width=20></TD><TD><B>0.0000</B></TD></TR><TR><TD><B> Max Conceal Ratio</B></TD><td width=20></TD><TD><B>0.0000</B></TD></TR><TR><TD><B> Conceal Secs</B></TD><td width=20></TD><TD><B>0</B></TD></TR><TR><TD><B> Severely Conceal Secs</B></TD><td width=20></TD><TD><B>0</B></TD></TR><TR><TD><B> Latency</B></TD><td width=20></TD><TD><B>0</B></TD></TR><TR><TD><B> Max Jitter</B></TD><td width=20></TD><TD><B>13</B></TD></TR><TR><TD><B> Sender Size</B></TD><td width=20></TD><TD><B>0 ms</B></TD></TR><TR><TD><B> Sender Reports Received</B></TD><td width=20></TD><TD><B>0</B></TD></TR><TR><TD><B> Sender Report Time Received</B></TD><td width=20></TD><TD><B>00:00:00</B></TD></TR><TR><TD><B> Rcvr Size</B></TD><td width=20></TD><TD><B>20 ms</B></TD></TR><TR><TD><B> Rcvr Discarded</B></TD><td width=20></TD><TD><B>1</B></TD></TR><TR><TD><B> Rcvr Reports Received</B></TD><td width=20></TD><TD><B>0</B></TD></TR><TR><TD><B> Rcvr Report Time Received</B></TD><td width=20></TD><TD><B>00:00:00</B></TD></TR></TABLE></DIV></TD></TR></TABLE></BODY></HTML>

Hi,

Well it’s the 13th occurrence of the tag <b> you are looking for, so if that doesn’t change this would work:
select: “b:nth-of-type(13)”

Regards PH

That did it. Thanks a ton!