<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Pelletpreis von https:&#x2F;&#x2F;www.heizpellets24.de auslesen. Wie?]]></title><description><![CDATA[<p dir="auto">Hallo zusammen,</p>
<p dir="auto">ich würde gerne den aktuellen Pelletpreis von <a href="https://www.heizpellets24.de/pelletpreise" rel="nofollow ugc">https://www.heizpellets24.de/pelletpreise</a> als Nummer auslesen.<br />
Wie mache ich das am besten? Ggf. über Parser?</p>
<p dir="auto">Danke im Voraus!</p>
]]></description><link>https://forum.iobroker.net/topic/84437/pelletpreis-von-https-www.heizpellets24.de-auslesen.-wie</link><generator>RSS for Node</generator><lastBuildDate>Sat, 02 May 2026 09:14:02 GMT</lastBuildDate><atom:link href="https://forum.iobroker.net/topic/84437.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 30 Apr 2026 13:57:08 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Pelletpreis von https:&#x2F;&#x2F;www.heizpellets24.de auslesen. Wie? on Fri, 01 May 2026 08:31:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/urei" aria-label="Profile: urei">@<bdi>urei</bdi></a></p>
<p dir="auto">Teste mal das js.<br />
Bei mir hat geklappt.</p>
<pre><code>// ============================================================
//  Pelletpreis von heizpellets24.de → ioBroker Datenpunkt
// ============================================================

// ── Konfiguration ─────────────────────────────────────────
const DATAPOINT   = '0_userdata.0.dummy_leer';  // Ziel-Datenpunkt
const INTERVAL_MS = 6 * 60 * 60 * 1000;         // Intervall: alle 6 Stunden
// ──────────────────────────────────────────────────────────

const https = require('https');

function fetchPelletPrice() {
    const options = {
        headers: {
            'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 Chrome/124.0 Safari/537.36',
            'Accept': 'text/html,application/xhtml+xml',
            'Accept-Language': 'de-DE,de;q=0.9'
        }
    };

    https.get('https://www.heizpellets24.de/pelletpreise', options, (res) =&gt; {
        let body = '';
        res.on('data', chunk =&gt; body += chunk);
        res.on('end', () =&gt; {
            try {
                const match = body.match(/durchschnittlich\s+([\d]+[,.][\d]+)/);
                if (!match) {
                    log('Pelletpreis: Kein Preis gefunden – Seitenstruktur geändert?', 'warn');
                    return;
                }

                const price = parseFloat(match[1].replace(',', '.'));
                if (isNaN(price) || price &lt; 100 || price &gt; 1000) {
                    log('Pelletpreis: Ungültiger Preiswert: ' + match[1], 'warn');
                    return;
                }

                setState(DATAPOINT, { val: price, ack: true });
                log('Pelletpreis: ' + price + ' €/t → ' + DATAPOINT);

            } catch (e) {
                log('Pelletpreis: Fehler: ' + e.message, 'error');
            }
        });
    }).on('error', e =&gt; log('Pelletpreis: HTTP-Fehler: ' + e.message, 'error'));
}

fetchPelletPrice();
setInterval(fetchPelletPrice, INTERVAL_MS);
</code></pre>
]]></description><link>https://forum.iobroker.net/post/1337338</link><guid isPermaLink="true">https://forum.iobroker.net/post/1337338</guid><dc:creator><![CDATA[David G.]]></dc:creator><pubDate>Fri, 01 May 2026 08:31:34 GMT</pubDate></item><item><title><![CDATA[Reply to Pelletpreis von https:&#x2F;&#x2F;www.heizpellets24.de auslesen. Wie? on Thu, 30 Apr 2026 21:44:24 GMT]]></title><description><![CDATA[<p dir="auto">Hier die Stelle, wo der Wert im html-Code steckt.<br />
<img src="/assets/uploads/files/1777585115109-be718185-23b9-44f5-a784-984a05e59b11-pelletpreis-resized.jpg" alt="pelletpreis.jpg" class=" img-fluid img-markdown" /></p>
<p dir="auto">Weiteres sagt die google-ki unter der Frage: "js html code einer fremden seite auslesen".</p>
<p dir="auto">Das Auslesen des HTML-Codes einer fremden Webseite (Web Scraping) mit JavaScript kann im Browser aufgrund von Sicherheitsrichtlinien (Same-Origin Policy) schwierig sein, ist aber mit verschiedenen Techniken möglich. ....</p>
<p dir="auto">Zum 'Web Scraping' gibt es Video-Tutorials.</p>
<p dir="auto">Leider keine direkte Lösung, aber vielleicht bist du damit eine Schritt weiter.</p>
]]></description><link>https://forum.iobroker.net/post/1337300</link><guid isPermaLink="true">https://forum.iobroker.net/post/1337300</guid><dc:creator><![CDATA[geschild]]></dc:creator><pubDate>Thu, 30 Apr 2026 21:44:24 GMT</pubDate></item></channel></rss>