Hallo Leute,
ich möchte eine eigentlich einfach gestrickte Website auslesen um an die Werte zu kommen:
Mich interessiert im ersten Step nur
<td>Temperature 1<td> <h2>10.0°C</h2> Also habe ich den HS wie in den Bildern konfiguriert, aber die Abfrage läuft nicht durch, warschienlich nur die ersten 3 Blöcke.
Die Frage ist nun wie muss der Datenblock aussehen damit ich den Wert in eine Variable bekomme? Warscheinlich regt er sich wegen dem Steuerzeichen direkt hinter dem Wert auf... Kann da jemand helfen? datenblock1.png
datenblock2.png
ich möchte eine eigentlich einfach gestrickte Website auslesen um an die Werte zu kommen:
HTML-Code:
<HTML> <head><meta http-equiv="refresh" content="5"><META Http-equiv="Content-Type" Content="text/html; charset=windows-1252"> <style type="text/css">body { font-family: Arial,Helvetica,"Trebuchet MS", sans-serif; }h2{font-size: 18px;margin: 0px 0 0px 0px; color:#FFF;}</style> </head> <body bgcolor=#D6EBFF> <br> <center>[ <a href="/monitor.htm" ><span>monitoring</span></a> ] [ <a href="/setupn.htm" ><span>network setup</span></a> ] [ <a href="/setups.htm" ><span>snmp setup</span></a> ] [ <a href="/setupio.htm" ><span>I/O setup</span></a> ] [ <a href="/update.htm" ><span>update</span></a> ] [ <a href="/logout.htm" ><span>logout</span></a> ]</center> <br> <br> <center> <center> <br> <br> </center> <table bgcolor="#6386BD" border=1 cellpadding=5 width=600> <tr height=60> <td width=150>Digital input 1<td width=150 bgcolor="#00FF00" align=center> <b>OPEN</b> <td width=150>Digital input 2<td width=150 bgcolor="#00FF00" align=center> <b>OPEN</b> <tr height=50> <td>Analog input 1<td> <h2>0.0V</h2> <td>Analog input 2<td> <h2>0.0V</h2> <tr height=50> <td>Temperature 1<td> <h2>10.0°C</h2> <td>Temperature 2<td> <h2>7.8°C</h2> <tr height=50> <td>Humidity 1<td> <h2>---%RH</h2> <td>Humidity 2<td> <h2>---%RH</h2> <tr height=60> <td>Relay output 1<td bgcolor="#FF0000" align=center> <b>OFF</b> <th colspan="2"><table> <tr> <td align=center> <form name=t1 method=POST> <INPUT TYPE=hidden name=tg1 value=1> <INPUT TYPE=submit value=ON/OFF class=button> </form> <td align=center> <form name=p1 method=POST> <INPUT TYPE=hidden name=pl1 value=1> <INPUT TYPE=submit value= Pulse class=button> </form> </table><tr height=60> <td>Relay output 2<td bgcolor="#FF0000" align=center> <b>OFF</b> <th colspan="2"><table> <tr><td align=center> <form name=t1 method=POST> <INPUT TYPE=hidden name=tg2 value=1> <INPUT TYPE=submit value=ON/OFF class=button> </form> <td align=center> <form name=p1 method=POST> <INPUT TYPE=hidden name=pl2 value=1> <INPUT TYPE=submit value= Pulse class=button> </form> </table></table> </table> </center> </BODY> </HTML>
<td>Temperature 1<td> <h2>10.0°C</h2> Also habe ich den HS wie in den Bildern konfiguriert, aber die Abfrage läuft nicht durch, warschienlich nur die ersten 3 Blöcke.
Code:
29.09.2015 07:59:59 (IP: 10.110.195.100) (Port: 80) [B](Send: 70) 0x47 0x45 0x54 0x20 0x2f 0x6d 0x6f 0x6e 0x69 0x74 0x6f 0x72 0x2e 0x68 0x74 0x6d 0x20 0x48 0x54 0x54 0x50 0x2f 0x31 0x2e 0x30 0xd 0xa 0x48 0x6f 0x73 0x74 0x3a 0x20 0x31 0x30 0x2e 0x31 0x31 0x30 0x2e 0x31 0x39 0x35 0x2e 0x31 0x30 0x30 0xd 0xa 0x43 0x6f 0x6e 0x6e 0x65 0x63 0x74 0x69 0x6f 0x6e 0x3a 0x20 0x43 0x6c 0x6f 0x73 0x65 0xd 0xa 0xd 0xa[/B] GET /monitor.htm HTTP/1.0 Host: 10.110.195.100 Connection: Close [B](Recv: 2311) 0x48 0x54 0x54 0x50 0x2f 0x31 0x2e 0x31 0x20 0x32 0x30 0x30 0x20 0x4f 0x4b 0xd 0xa 0x43 0x6f 0x6e 0x6e 0x65 0x63 0x74 0x69 0x6f 0x6e 0x3a 0x20 0x63 0x6c 0x6f 0x73 0x65 0xd 0xa 0x43 0x6f 0x6e 0x74 0x65 0x6e 0x74 0x2d 0x54 0x79 0x70 0x65 0x3a 0x20 0x74 0x65 0x78 0x74 0x2f 0x68 0x74 0x6d 0x6c 0xd 0xa 0x43 0x61 0x63 0x68 0x65 0x2d 0x43 0x6f 0x6e 0x74 0x72 0x6f 0x6c 0x3a 0x20 0x6e 0x6f 0x2d 0x63 0x61 0x63 0x68 0x65 0xd 0xa 0xd 0xa 0x3c 0x48 0x54 0x4d 0x4c 0x3e 0xd 0xa 0x3c 0x68 0x65 0x61 0x64 0x3e 0x3c 0x6d 0x65 0x74 0x61 0x20 0x68 0x74 0x74 0x70 0x2d 0x65 0x71 0x75 0x69 0x76 0x3d 0x22 0x72 0x65 0x66 0x72 0x65 0x73 0x68 0x22 0x20 0x63 0x6f 0x6e 0x74 0x65 0x6e 0x74 0x3d 0x22 0x35 0x22 0x3e 0x3c 0x4d 0x45 0x54 0x41 0x20 0x48 0x74 0x74 0x70 0x2d 0x65 0x71 0x75 0x69 0x76 0x3d 0x22 0x43 0x6f 0x6e 0x74 0x65 0x6e 0x74 0x2d 0x54 0x79 0x70 0x65 0x22 0x20 0x43 0x6f 0x6e 0x74 0x65 0x6e 0x74 0x3d 0x22 0x74 0x65 0x78 0x74 0x2f 0x68 0x74 0x6d 0x6c 0x3b 0x20 0x63 0x68 0x61 0x72 0x73 0x65 0x74[/B] HTTP/1.1 200 OK Connection: close Content-Type: text/html Cache-Control: no-cache [HTML] [head][meta http-equiv="refresh" content="5"][META Http-equiv="Content-Type" Content="text/html; charset [B](Gesamt: 5) (Work: 3) (Typ: Liste) (OK: 0)[/B]
datenblock2.png
Kommentar