NEWS
[gelöst] Ista - Ablesung Heizung und Warmwasser
-
Hallo,
wir sind Mieter und erhalten unsere Verbrauchsdaten monatlich per App und eMail. Die Daten werden von Ista (Ablesedienst) zur Verfügung gestellt. Bisher habe ich keinen Adapter gefunden, mit dem ich die Daten auswerten kann.
Dank @Lucky_ESA und seinem Adapter kann ich die eMails auswerten, speziell den HTML-Teil. Es kommt also monatlich eine eMail mit den Daten des aktuellen und des vorherigen Monats.
In der Vergangenheit habe ich bereits andere Seiten ausgelesen und verarbeitet. Es sind kleinere und "einfachere" Seiten gewesen. Das klappt auch bestens.
Hier jedoch scheitere ich absolut und bin damit an meine Grenzen gestoßen. Ich benötige in diesem Fall eure Hilfe.
Ich arbeite ausschließlich mit JS, kein Blockly. Hier mal der HTML-Bereich:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"> <head> <title> </title> <!--[if !mso]><!--> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <!--<![endif]--> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <style type="text/css"> #outlook a { padding: 0; } body { margin: 0; padding: 0; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; } table, td { border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; } img { border: 0; height: auto; line-height: 100%; outline: none; text-decoration: none; -ms-interpolation-mode: bicubic; } p { display: block; margin: 13px 0; } .im { color: #003978 !important; } </style> <!--[if mso]> <noscript> <xml> <o:OfficeDocumentSettings> <o:AllowPNG/> <o:PixelsPerInch>96</o:PixelsPerInch> </o:OfficeDocumentSettings> </xml> </noscript> <![endif]--> <!--[if lte mso 11]> <style type="text/css"> .mj-outlook-group-fix { width:100% !important; } </style> <![endif]--> <!--[if !mso]><!--> <link href="../fonts/Roboto.css" rel="stylesheet" type="text/css"> <style type="text/css"> @import url(../fonts/Roboto.css); </style> <!--<![endif]--> <style type="text/css"> @media only screen and (min-width:480px) { .mj-column-per-100 { width: 100% !important; max-width: 100%; } .mj-column-per-50 { width: 50% !important; max-width: 50%; } .mj-column-per-30 { width: 30% !important; max-width: 30%; } .mj-column-per-25 { width: 25% !important; max-width: 25%; } .mj-column-per-75 { width: 75% !important; max-width: 75%; } .mj-column-per-40 { width: 40% !important; max-width: 40%; } .mj-column-per-60 { width: 60% !important; max-width: 60%; } .mj-column-per-70 { width: 70% !important; max-width: 70%; } } </style> <style media="screen and (min-width:480px)"> .moz-text-html .mj-column-per-100 { width: 100% !important; max-width: 100%; } .moz-text-html .mj-column-per-50 { width: 50% !important; max-width: 50%; } .moz-text-html .mj-column-per-30 { width: 30% !important; max-width: 30%; } .moz-text-html .mj-column-per-40 { width: 40% !important; max-width: 40%; } .moz-text-html .mj-column-per-70 { width: 70% !important; max-width: 70%; } </style> <style type="text/css"> @media only screen and (max-width:480px) { table.mj-full-width-mobile { width: 100% !important; } td.mj-full-width-mobile { width: auto !important; } } </style> </head> <body style="word-spacing:normal;background-color:#ffffff;"> <!--[if !mso]><!--> <span style="opacity: 0; color:transparent; "> 2023-05-10 01:18:51.74 </span> <!--<![endif]--> <div style="background-color:#ffffff;"> <!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]--> <div style="margin:0px auto;max-width:600px;"> <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;"> <tbody> <tr> <td style="direction:ltr;font-size:0px;padding:0px;text-align:center;"> <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:600px;" ><![endif]--> <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"> <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"> <tbody> <tr> <td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;"> <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse:collapse;border-spacing:0px;"> <tbody> <tr> <td style="width:550px;"> <img alt="Logo" height="auto" src="https://ecotrend.ista.de/assets/public/ista_email_header.png" style="border:0;display:block;outline:none;text-decoration:none;height:auto;width:100%;font-size:13px;" width="550" /> </td> </tr> </tbody> </table> </td> </tr> </tbody> </table> </div> <!--[if mso | IE]></td></tr></table><![endif]--> </td> </tr> </tbody> </table> </div> <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]--> <div style="margin:0px auto;max-width:600px;"> <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;"> <tbody> <tr> <td style="direction:ltr;font-size:0px;padding:0px 20px;text-align:center;"> <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:560px;" ><![endif]--> <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"> <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"> <tbody> <tr> <td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;"> <div style="font-family:Roboto, Helvetica, sans-serif;font-size:15px;font-weight:400;line-height:17px;text-align:left;color:#003978 !important;"> <p><span style="color:#003978 !important;">Guten Tag DDDDDD und FFFFFFF,</span> </p> <p><span style="color:#003978 !important;">wir machen Ihre Verbräuche transparent! Heute erhalten Sie Ihre Verbrauchsinformation für die Wohnung </span><span style="color:#003978 !important;"> XXXstraße YY, </span><span style="color:#003978 !important;"> ZZZZZZ XXXXXX </span><span style="color:#003978 !important;"> für den Monat April.</span></p> <p><span style="color:#003978 !important;">Hier sehen Sie Ihre individuellen Verbräuche auf einen Blick.</span></p> </div> </td> </tr> </tbody> </table> </div> <!--[if mso | IE]></td></tr></table><![endif]--> </td> </tr> </tbody> </table> </div> <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]--> <div style="margin:0px auto;max-width:600px;"> <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;"> <tbody> <tr> <td style="direction:ltr;font-size:0px;padding:0px 20px;text-align:center;"> <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:560px;" ><![endif]--> <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"> <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"> <tbody> <tr> <td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;"> <div style="font-family:Roboto, Helvetica, sans-serif;font-size:15px;font-weight:400;line-height:17px;text-align:left;color:#003978 !important;"> <p style="color: #003978 !important; margin:0; font-size:20px;font-weight:700">Ihre aktuellen Verbräuche in Zahlen</p> <p style="color:#999999;font-weight:700; font-size:13px"> <span>Liegenschaft-Nr.: 0123456789</span> <span style="padding-left:4px">Nutzeinheit-Nr.: 0012</span> <span style="padding-left:4px">Stockwerk: 6OG</span> <span style="padding-left:4px">Int. Nutzer-Nr. HV: 0000.00.0</span> </p> </div> </td> </tr> </tbody> </table> </div> <!--[if mso | IE]></td></tr></table><![endif]--> </td> </tr> </tbody> </table> </div> <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]--> <div style="margin:0px auto;max-width:600px;"> <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;"> <tbody> <tr> <td style="direction:ltr;font-size:0px;padding:0px 20px;text-align:center;"> <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:560px;" ><![endif]--> <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"> <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"> <tbody> <tr> <td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;"> <div style="font-family:Roboto, Helvetica, sans-serif;font-size:18px; font-weight:700;font-weight:400;line-height:17px;text-align:left;color:#84B400;"> <strong>Heizung</strong> </div> </td> </tr> </tbody> </table> </div> <!--[if mso | IE]></td></tr></table><![endif]--> <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:560px;" ><![endif]--> <div class="mj-column-per-100 mj-outlook-group-fix" style="width:100%;"> <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"> <tbody> <tr> <td align="left" style="padding-left: 25px; padding-top: 20px;word-break:break-word;"> <div style="font-family:Roboto, Helvetica, sans-serif;font-size:15px;font-weight:400;text-align:left;color:#003978 !important;"> <strong> April 2023</strong> </div> </td> </tr> <tr> <td align="left" style="padding-left: 25px; word-break:break-word;"> <div style="font-family:Roboto, Helvetica, sans-serif;font-size:15px;font-weight:400;text-align:left;color:#003978 !important;"> <span style="font-size: 24px"><strong> 14 Einheiten (15,5 kWh**)</strong> </span> </div> </td> </tr> </tbody> </table> </div> <!--[if mso | IE]></td></tr></table><![endif]--> <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:560px;" ><![endif]--> <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"> <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"> <tbody> <tr> <td align="left" style="font-size:0px;padding-left: 25px; padding-top: 20px;word-break:break-word;"> <div style="font-family:Roboto, Helvetica, sans-serif;font-size:15px;font-weight:400;line-height:17px;text-align:left;color:#999999 !important;"> <strong>März 2023</strong> </div> </td> </tr> <tr> <td align="left" style="padding-left: 25px; word-break:break-word;"> <div style="font-family:Roboto, Helvetica, sans-serif;font-size:24px;font-weight:400;text-align:left;color:#999999 !important;"> <strong> 110 Einheiten (119,3 kWh**)</strong> </div> </td> </tr> <tr> <td align="left" style="padding-left: 25px; padding-top: 20px;word-break:break-word;"> <div style="font-family:Roboto, Helvetica, sans-serif;font-size:15px;font-weight:400;line-height:17px;text-align:left;color:#003978 !important;"> <p style="margin:0;">In vergleichbaren Wohnungen liegt der durchschnittliche monatliche Verbrauch bei 280 Einheiten (304,9 kWh**).</p> </div> </td> </tr> </tbody> </table> </div> <!--[if mso | IE]></td></tr></table><![endif]--> <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:560px;" ><![endif]--> <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"> <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"> <tbody> <tr> <td align="left" style="font-size:0px;padding-top: 20px; padding-left: 25px;word-break:break-word;"> <div style="font-family:Roboto, Helvetica, sans-serif;font-size:18px; font-weight:700;font-weight:400;line-height:17px;text-align:left;color:#84B400;"> <strong>Warmwasser</strong> </div> </td> </tr> </tbody> </table> </div> <!--[if mso | IE]></td></tr></table><![endif]--> <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:560px;" ><![endif]--> <div class="mj-column-per-100 mj-outlook-group-fix" style="width:100%;"> <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"> <tbody> <tr> <td align="left" style="padding-left: 25px; padding-top: 20px;word-break:break-word;"> <div style="font-family:Roboto, Helvetica, sans-serif;font-size:15px;font-weight:400;text-align:left;color:#003978 !important;"> <strong> April 2023</strong> </div> </td> </tr> <tr> <td align="left" style="padding-left: 25px; word-break:break-word;"> <div style="font-family:Roboto, Helvetica, sans-serif;font-size:15px;font-weight:400;text-align:left;color:#003978 !important;"> <span style="font-size: 24px"><strong> 2,3 m³ (131,8 kWh**)</strong> </span> </div> </td> </tr> </tbody> </table> </div> <!--[if mso | IE]></td></tr></table><![endif]--> <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:560px;" ><![endif]--> <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"> <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"> <tbody> <tr> <td align="left" style="font-size:0px;padding-left: 25px; padding-top: 20px;word-break:break-word;"> <div style="font-family:Roboto, Helvetica, sans-serif;font-size:15px;font-weight:400;line-height:17px;text-align:left;color:#999999 !important;"> <strong>März 2023</strong> </div> </td> </tr> <tr> <td align="left" style="padding-left: 25px; word-break:break-word;"> <div style="font-family:Roboto, Helvetica, sans-serif;font-size:24px;font-weight:400;text-align:left;color:#999999 !important;"> <strong> 2,2 m³ (129,9 kWh**)</strong> </div> </td> </tr> <tr> <td align="left" style="padding-left: 25px; padding-top: 20px;word-break:break-word;"> <div style="font-family:Roboto, Helvetica, sans-serif;font-size:15px;font-weight:400;line-height:17px;text-align:left;color:#003978 !important;"> <p style="margin:0;">In vergleichbaren Wohnungen liegt der durchschnittliche monatliche Verbrauch bei 1,4 m³ (83,6 kWh**).</p> </div> </td> </tr> </tbody> </table> </div> <!--[if mso | IE]></td></tr></table><![endif]--> </td> </tr> </tbody> </table> </div> <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]--> <div style="margin:0px auto;max-width:600px;"> <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;"> <tbody> <tr> <td style="direction:ltr;font-size:0px;padding:20px;text-align:center;"> <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:560px;" ><![endif]--> <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"> <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"> <tr> <td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;"> <div style="font-family:Roboto, Helvetica, sans-serif;font-size:13px;font-weight:400;line-height:18px;text-align:left;color:#003978 !important;"> Hierbei handelt es sich um eine Verbrauchsindikation. Die tatsächlichen Verbräuche auf Ihrer jährlichen Verbrauchsabrechnung können von den dargestellten Werten abweichen.</div> </td> </tr> <tr> <td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;"> <div style="font-family:Roboto, Helvetica, sans-serif;font-size:14px;font-weight:300;line-height:17px;text-align:left;color:#003978 !important;"> <p style="font-size: 10px">**Der in einer anderen Einheit gemessene Verbrauch wird informativ in kWh dargestellt.</p> </div> </td> </tr> <tr> <td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;"> <div style="font-family:Roboto, Helvetica, sans-serif;font-size:15px;font-weight:400;line-height:22px;text-align:left;color:#003978 !important;"> <p style="margin:0;">Ihre nächste Verbrauchsinformation erhalten Sie im Juni.</p> </div> </td> </tr> <tr> <td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;"> <div style="font-family:Roboto, Helvetica, sans-serif;font-size:15px;font-weight:400;line-height:18px;text-align:left;color:#003978 !important;"> <p style="margin:0;">Freundliche Grüße</p> </div> </td> </tr> <tr> <td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;"> <div style="font-family:Roboto, Helvetica, sans-serif;font-size:15px;font-weight:400;line-height:18px;text-align:left;color:#003978 !important;"> <p style="margin:0;">Ihre ista SE</p> </div> </td> </tr> </table> </div> <!--[if mso | IE]></td></tr></table><![endif]--> </td> </tr> </tbody> </table> </div> <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]--> <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]--> <div style="margin:0px auto;max-width:600px;"> <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;"> <tbody> <tr> <td style="direction:ltr;font-size:0px;padding:0px 20px 20px 20px;text-align:center;"> <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" width="600px" ><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:560px;" width="560" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]--> <div style="margin:0px auto;max-width:560px;"> <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;"> <tbody> <tr> <td style="direction:ltr;font-size:0px;padding:0px;text-align:center;"> <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:560px;" ><![endif]--> <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"> <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"> <tr> <td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;"> <div style="font-family:Roboto, Helvetica, sans-serif;font-size:15px;font-weight:400;line-height:17px;text-align:left;color:#003978 !important;"> <p style="margin:0;">Haben Sie Fragen oder möchten weitere Hilfe? <strong>Wir sind für Sie da:</strong></p> </div> </td> </tr> </table> </div> <!--[if mso | IE]></td></tr></table><![endif]--> </td> </tr> </tbody> </table> </div> <!--[if mso | IE]></td></tr></table></td></tr><tr><td class="" width="600px" ><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:560px;" width="560" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]--> <div style="margin:0px auto;max-width:560px;"> <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;"> <tbody> <tr> <td style="direction:ltr;font-size:0px;padding:0px;text-align:center;"> <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:168px;" ><![endif]--> <div class="mj-column-per-40 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;"> <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"> <tr> <td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;"> <div style="font-family:Roboto, Helvetica, sans-serif;font-size:15px;font-weight:400;line-height:17px;text-align:left;color:#003978 !important;"> <p style="margin:0;">Deutschland</p> </div> </td> </tr> </table> </div> <!--[if mso | IE]></td><td class="" style="vertical-align:top;width:392px;" ><![endif]--> <div class="mj-column-per-60 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;"> <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"> <tr> <td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;"> <div style="font-family:Roboto, Helvetica, sans-serif;font-size:15px;font-weight:400;line-height:17px;text-align:left;color:#003978 !important;"> <p style="margin:0;">+49 (0) 341 55003-722</p> </div> </td> </tr> </table> </div> <!--[if mso | IE]></td></tr></table><![endif]--> </td> </tr> </tbody> </table> </div> <!--[if mso | IE]></td></tr></table></td></tr><tr><td class="" width="600px" ><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:560px;" width="560" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]--> <div style="margin:0px auto;max-width:560px;"> <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;"> <tbody> <tr> <td style="direction:ltr;font-size:0px;padding:0px;text-align:center;"> <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:168px;" ><![endif]--> <div class="mj-column-per-40 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;"> <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"> <tr> <td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;"> <div style="font-family:Roboto, Helvetica, sans-serif;font-size:15px;font-weight:400;line-height:17px;text-align:left;color:#003978 !important;"> <p style="margin:0">Montag bis Freitag</p> </div> </td> </tr> </table> </div> <!--[if mso | IE]></td><td class="" style="vertical-align:top;width:392px;" ><![endif]--> <div class="mj-column-per-60 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;"> <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"> <tr> <td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;"> <div style="font-family:Roboto, Helvetica, sans-serif;font-size:15px;font-weight:400;line-height:17px;text-align:left;color:#003978 !important;"> <p style="margin:0">08:00 bis 20:00 Uhr</p> </div> </td> </tr> </table> </div> <!--[if mso | IE]></td></tr></table><![endif]--> </td> </tr> <tr> <td style="direction:ltr;font-size:0px;padding:0px;text-align:center;"> <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:168px;" ><![endif]--> <div class="mj-column-per-40 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;"> <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"> <tr> <td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;"> <div style="font-family:Roboto, Helvetica, sans-serif;font-size:15px;font-weight:400;line-height:17px;text-align:left;color:#003978 !important;"> <p style="margin:0">Samstag</p> </div> </td> </tr> </table> </div> <!--[if mso | IE]></td><td class="" style="vertical-align:top;width:392px;" ><![endif]--> <div class="mj-column-per-60 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;"> <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"> <tr> <td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;"> <div style="font-family:Roboto, Helvetica, sans-serif;font-size:15px;font-weight:400;line-height:17px;text-align:left;color:#003978 !important;"> <p style="margin:0">08:00 bis 16:00 Uhr</p> </div> </td> </tr> </table> </div> <!--[if mso | IE]></td></tr></table><![endif]--> </td> </tr> </tbody> </table> </div> <!--[if mso | IE]></td></tr></table></td></tr></table><![endif]--> </td> </tr> </tbody> </table> </div> <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]--> <div style="Margin:0px auto;max-width:600px;"> <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;"> <tbody> <tr> <td style="direction:ltr;font-size:0px;padding:0px 20px;text-align:center;vertical-align:top;"> <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:560px;" ><![endif]--> <div class="mj-column-per-100 outlook-group-fix" style="font-size:13px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"> <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"> <tr> <td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;"> <div style="font-family:Roboto, Helvetica, sans-serif;font-size:15px;font-weight:400;line-height:17px;text-align:left;color:#003978 !important;"> <p style="margin:0;">Bei telefonischen Fragen zu Ihrem individuellen Verbrauch benötigen Sie einen Support Code, damit wir Sie eindeutig identifizieren können. Sie finden diesen Support Code nach dem Login im Menü unter „Kontakt“. Bezüglich allgemeiner oder technischer Fragen können Sie sich gerne ohne Support Code an uns wenden.</p> </div> </td> </tr> </table> </div> <!--[if mso | IE]></td></tr></table><![endif]--> </td> </tr> </tbody> </table> </div> <!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]--> <div style="margin:0px auto;max-width:600px;"> <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;"> <tbody> <tr> <td style="direction:ltr;font-size:0px;padding:0px 20px 20px 20px;text-align:center;"> <!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:560px;" ><![endif]--> <div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"> <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"> <tr> <td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;"> <div style="font-family:Roboto, Helvetica, sans-serif;font-size:15px;font-weight:400;line-height:17px;text-align:left;color:#003978 !important;"> <p style="margin:0;"><span style="color:#003978 !important;">Sie möchten keine monatliche Verbrauchsinformation per E-Mail erhalten? Hier können Sie die E-Mail abbestellen:</span> <br /> <a style="color: #003978 !important;font-weight:700" href="AAAA"> AAAAA </a> <br /><br /><span style="color:#003978 !important;">Sie möchten Ihre Einwilligung zu Werbung widerrufen?</span> <br /> <a style="color: #003978 !important;font-weight:700" href="BBBB"> BBBBB </a> <br /><br /><span style="color:#003978 !important;">Sie möchten Ihre Einwilligung zu Marktforschung widerrufen?</span> <br /> <a style="color: #003978 !important;font-weight:700" href="CCCC"> CCCCC </a> </p> </div> </td> </tr> </table> </div> <!--[if mso | IE]></td></tr></table><![endif]--> </td> </tr> </tbody> </table> </div> <!--[if mso | IE]></td></tr></table><![endif]--> </div> <!--[if !mso]><!--> <span style="opacity: 0; color:transparent; "> 2023-05-10 01:18:51.74 </span> <!--<![endif]--> </body> </html>
Ich möchte also gerne die rot umrandeten Daten (das was in Klammern steht nicht) auslesen und weiterverarbeiten.
Vorab schon einmal vielen Dank.
Ro75.
-
@ro75 sagte in Ista - Ablesung Heizung und Warmwasser:
Ich möchte also gerne die rot umrandeten Daten
m³
ong>\s([\d\,]+)\sm
num=1 für april und num=2 für märzentsprechend Heizung
ong>\s(\d+)\sEinh
efit:
sorry war für den Parser
scripten müssen andere -
@homoran Danke für die schnelle Antwort. Hab schon gegrübelt ob du "RegEx" meinst. Richtig, ich verwende nicht den Parser-Adapter. Möchte es ausschließlich via Script.
-
Hab mit Java ja garnichts am Hut.....
Hab mir aber die letzte Zeit sehr viel mit CSS von ChatGPT helfen lassen.Poste das jetzt nur mal aus Interesse, um zu sehen ob das auch klappt.....
// HTML-Code als Zeichenkette var htmlCode = "<html>...</html>"; // Erstellen eines temporären HTML-Elements, um den Code zu analysieren var tempElement = document.createElement('div'); tempElement.innerHTML = htmlCode; // Verbräuche extrahieren var consumptionElements = tempElement.querySelectorAll('div[style*="font-size:15px"]'); var verbraeuche = []; for (var i = 0; i < consumptionElements.length; i++) { var consumption = consumptionElements[i].innerText.trim(); verbraeuche.push(consumption); } // Ausgabe der Verbräuche console.log(verbraeuche);
Hier angepasst, dass es wohl nur die Zahlen mit Einheiten sind.
// HTML-Code als Zeichenkette var htmlCode = "<html>...</html>"; // Erstellen eines temporären HTML-Elements, um den Code zu analysieren var tempElement = document.createElement('div'); tempElement.innerHTML = htmlCode; // Verbräuche extrahieren var consumptionElements = tempElement.querySelectorAll('div[style*="font-size:15px"]'); var verbraeuche = []; for (var i = 0; i < consumptionElements.length; i++) { var consumptionText = consumptionElements[i].innerText.trim(); var regex = /(\d+\.\d+)\s*(\D+)/; var matches = consumptionText.match(regex); if (matches) { var value = matches[1]; var unit = matches[2]; var verbrauch = value + ' ' + unit; verbraeuche.push(verbrauch); } } // Ausgabe der Verbräuche console.log(verbraeuche);
-
@david-g sagte in Ista - Ablesung Heizung und Warmwasser:
um zu sehen ob das auch klappt.....
eher nicht.
der scheint nur die Stellen mit den Verbräuchen als HTML Snipper, nicht als Wert zu extrahieren.ob das wenigstens passt kann sein, muss aber nicht da es nur den Schriftstil abfragt.
(wenn ich es korrekt verstehe)
EDIT!
Dein undokumentiertes edit kommt der Sache schon näher -
@david-g sagte in Ista - Ablesung Heizung und Warmwasser:
document
Testen kann ich es nicht, da ich im Moment nicht "document" deklarieren kann.
-
Habe das Problem nun doch selber lösen können. War letztlich weniger kompliziert als zuvor angenommen:
var i, result, j, json, s; sendTo("imap.0", "getIMAPRequest", { name: "xxxxxxx_gmx.de", max: 20, search: '["ALL", ["HEADER", "FROM", "no-reply@ecotrend.ista.com"]]', fetch: JSON.parse('{"fetch": false, "seqno": [21954]}'), bodie: '{bodies: "", markSeen: false}', parse: true, }, async function (result) { if (!result) { console.log("No result found!"); return; } for (var i_index in result) { i = result[i_index]; s = getAttr(i, 'body.html'); //Auswertung starten Heizung(s); Warmwasser(s); } }); function Warmwasser(sValue) { //hier nun die einzlnen Werte auslesen und dann in DP schreiben für VIS const w = 'Warmwasser'; console.log(w); console.log(Zeitraum(sValue,w)); console.log(Einheiten(sValue,w)); } function Heizung(sValue) { //hier nun die einzlnen Werte auslesen und dann in DP schreiben für VIS const h = 'Heizung'; console.log(h); console.log(Zeitraum(sValue,h)); console.log(Einheiten(sValue,h)); } function Zeitraum(sValue,sType) { var Wert1 = sValue.substr(sValue.indexOf(sType)); var Position = Wert1.indexOf("<strong>"); var Wert2 = Wert1.substr(Position+8,25); return Wert1.substr(Position+8,Wert2.indexOf("<")); } function Einheiten(sValue,sType) { var Wert1 = sValue.substr(sValue.indexOf(sType)); Wert1 = Wert1.substr(Wert1.indexOf("<strong>")+50,600); var Wert2 = Wert1.substr(Wert1.indexOf("<strong>")+8); Wert1 = Wert1.substr(Wert1.indexOf("<strong>")+8,Wert2.indexOf("&")); return String(Wert1).replace('Einheiten','').replace(' m³',''); }
Ro75.