Bundesligatabelle

Begonnen von buzzmain, 18 September 2019, 22:33:05

Vorheriges Thema - Nächstes Thema

buzzmain

Ich hatte die Schnapsidee auf meiner Startseite die aktuelle Bundesligatabelle anzuzeigen.
Leider konnte ich dazu nicht viel finden. Also habe ich selbst etwas zusammengefrickelt.
Hier sei nochmal vielen Dank an @amenomade gerichtet der mir den entscheidenden Impuls gab für die Regex.

Es ist noch nicht perfekt aber schon mal ein netter Anfang.
Die Daten hole ich mit per HTTPMOD von der Webseite http://www.transfermarkt.de/2-bundesliga/tabelle/wettbewerb/L2
Das L2 steht für die 2. Liga (ja mein Verein ist in der 2. Liga.. aber nicht mehr lange ;) )
Sollte ihr das als 1. Liga (ihr Glücklichen) nachbauen wollen einfach den Link ändern in L1 am Ende.
Alle 2 Minuten wird aktualisiert (ist besondern an Spieltagen wichtig ;)

Hier das Define:
define bundesligaTabelle HTTPMOD http://www.transfermarkt.de/2-bundesliga/tabelle/wettbewerb/L2 6000

Diese Atribute habe ich gesetzt:
attr bundesligaTabelle enableControlSet 1
attr bundesligaTabelle enableCookies 1
attr bundesligaTabelle enforceGoodReadingNames 1
attr bundesligaTabelle handleRedirects 0


Die TabellendatenReadings sind nach folgenden Schema jeweils pro Tabellenplatz (01-18) gebaut:

  • platz01Torverhaeltnis
    platz01Punkte
    platz01Verein

Im Ganzen dann so:
attr bundesligaTabelle reading0102Name platz01Torverhaeltnis
attr bundesligaTabelle reading0102Regex (?s)class="rechts hauptlink">1.*?<td class="zentriert">([0-9]*:[0-9]*)<.td>
attr bundesligaTabelle reading0103Name platz01Punkte
attr bundesligaTabelle reading0103Regex (?s)class="rechts hauptlink">1.*?<td class="zentriert">[0-9]*<.td>.*?<td class="zentriert">([0-9]*)<.td>
attr bundesligaTabelle reading01Name platz01Verein
attr bundesligaTabelle reading01Regex (?s)class="rechts hauptlink">1.*?span><.td>.*?alt="(.*?)" class
attr bundesligaTabelle reading0202Name platz02Torverhaeltnis
attr bundesligaTabelle reading0202Regex (?s)class="rechts hauptlink">2.*?<td class="zentriert">([0-9]*:[0-9]*)<.td>
attr bundesligaTabelle reading0203Name platz02Punkte
attr bundesligaTabelle reading0203Regex (?s)class="rechts hauptlink">2.*?<td class="zentriert">[0-9]*<.td>.*?<td class="zentriert">([0-9]*)<.td>
attr bundesligaTabelle reading02Name platz02Verein
attr bundesligaTabelle reading02Regex (?s)class="rechts hauptlink">2.*?span><.td>.*?alt="(.*?)" class
attr bundesligaTabelle reading0302Name platz03Torverhaeltnis
attr bundesligaTabelle reading0302Regex (?s)class="rechts hauptlink">3.*?<td class="zentriert">([0-9]*:[0-9]*)<.td>
attr bundesligaTabelle reading0303Name platz03Punkte
attr bundesligaTabelle reading0303Regex (?s)class="rechts hauptlink">3.*?<td class="zentriert">[0-9]*<.td>.*?<td class="zentriert">([0-9]*)<.td>
attr bundesligaTabelle reading03Name platz03Verein
attr bundesligaTabelle reading03Regex (?s)class="rechts hauptlink">3.*?span><.td>.*?alt="(.*?)" class
attr bundesligaTabelle reading0402Name platz04Torverhaeltnis
attr bundesligaTabelle reading0402Regex (?s)class="rechts hauptlink">4.*?<td class="zentriert">([0-9]*:[0-9]*)<.td>
attr bundesligaTabelle reading0403Name platz04Punkte
attr bundesligaTabelle reading0403Regex (?s)class="rechts hauptlink">4.*?<td class="zentriert">[0-9]*<.td>.*?<td class="zentriert">([0-9]*)<.td>
attr bundesligaTabelle reading04Name platz04Verein
attr bundesligaTabelle reading04Regex (?s)class="rechts hauptlink">4.*?span><.td>.*?alt="(.*?)" class
attr bundesligaTabelle reading0502Name platz05Torverhaeltnis
attr bundesligaTabelle reading0502Regex (?s)class="rechts hauptlink">5.*?<td class="zentriert">([0-9]*:[0-9]*)<.td>
attr bundesligaTabelle reading0503Name platz05Punkte
attr bundesligaTabelle reading0503Regex (?s)class="rechts hauptlink">5.*?<td class="zentriert">[0-9]*<.td>.*?<td class="zentriert">([0-9]*)<.td>
attr bundesligaTabelle reading05Name platz05Verein
attr bundesligaTabelle reading05Regex (?s)class="rechts hauptlink">5.*?span><.td>.*?alt="(.*?)" class
attr bundesligaTabelle reading0602Name platz06Torverhaeltnis
attr bundesligaTabelle reading0602Regex (?s)class="rechts hauptlink">6.*?<td class="zentriert">([0-9]*:[0-9]*)<.td>
attr bundesligaTabelle reading0603Name platz06Punkte
attr bundesligaTabelle reading0603Regex (?s)class="rechts hauptlink">6.*?<td class="zentriert">[0-9]*<.td>.*?<td class="zentriert">([0-9]*)<.td>
attr bundesligaTabelle reading06Name platz06Verein
attr bundesligaTabelle reading06Regex (?s)class="rechts hauptlink">6.*?span><.td>.*?alt="(.*?)" class
attr bundesligaTabelle reading0702Name platz07Torverhaeltnis
attr bundesligaTabelle reading0702Regex (?s)class="rechts hauptlink">7.*?<td class="zentriert">([0-9]*:[0-9]*)<.td>
attr bundesligaTabelle reading0703Name platz07Punkte
attr bundesligaTabelle reading0703Regex (?s)class="rechts hauptlink">7.*?<td class="zentriert">[0-9]*<.td>.*?<td class="zentriert">([0-9]*)<.td>
attr bundesligaTabelle reading07Name platz07Verein
attr bundesligaTabelle reading07Regex (?s)class="rechts hauptlink">7.*?span><.td>.*?alt="(.*?)" class
attr bundesligaTabelle reading0802Name platz08Torverhaeltnis
attr bundesligaTabelle reading0802Regex (?s)class="rechts hauptlink">8.*?<td class="zentriert">([0-9]*:[0-9]*)<.td>
attr bundesligaTabelle reading0803Name platz08Punkte
attr bundesligaTabelle reading0803Regex (?s)class="rechts hauptlink">8.*?<td class="zentriert">[0-9]*<.td>.*?<td class="zentriert">([0-9]*)<.td>
attr bundesligaTabelle reading08Name platz08Verein
attr bundesligaTabelle reading08Regex (?s)class="rechts hauptlink">8.*?span><.td>.*?alt="(.*?)" class
attr bundesligaTabelle reading0902Name platz09Torverhaeltnis
attr bundesligaTabelle reading0902Regex (?s)class="rechts hauptlink">9.*?<td class="zentriert">([0-9]*:[0-9]*)<.td>
attr bundesligaTabelle reading0903Name platz09Punkte
attr bundesligaTabelle reading0903Regex (?s)class="rechts hauptlink">9.*?<td class="zentriert">[0-9]*<.td>.*?<td class="zentriert">([0-9]*)<.td>
attr bundesligaTabelle reading09Name platz09Verein
attr bundesligaTabelle reading09Regex (?s)class="rechts hauptlink">9.*?span><.td>.*?alt="(.*?)" class
attr bundesligaTabelle reading1002Name platz10Torverhaeltnis
attr bundesligaTabelle reading1002Regex (?s)class="rechts hauptlink">10.*?<td class="zentriert">([0-9]*:[0-9]*)<.td>
attr bundesligaTabelle reading1003Name platz10Punkte
attr bundesligaTabelle reading1003Regex (?s)class="rechts hauptlink">10.*?<td class="zentriert">[0-9]*<.td>.*?<td class="zentriert">([0-9]*)<.td>
attr bundesligaTabelle reading10Name platz10Verein
attr bundesligaTabelle reading10Regex (?s)class="rechts hauptlink">10.*?span><.td>.*?alt="(.*?)" class
attr bundesligaTabelle reading1102Name platz11Torverhaeltnis
attr bundesligaTabelle reading1102Regex (?s)class="rechts hauptlink">11.*?<td class="zentriert">([0-9]*:[0-9]*)<.td>
attr bundesligaTabelle reading1103Name platz11Punkte
attr bundesligaTabelle reading1103Regex (?s)class="rechts hauptlink">11.*?<td class="zentriert">[0-9]*<.td>.*?<td class="zentriert">([0-9]*)<.td>
attr bundesligaTabelle reading11Name platz11Verein
attr bundesligaTabelle reading11Regex (?s)class="rechts hauptlink">11.*?span><.td>.*?alt="(.*?)" class
attr bundesligaTabelle reading1202Name platz12Torverhaeltnis
attr bundesligaTabelle reading1202Regex (?s)class="rechts hauptlink">12.*?<td class="zentriert">([0-9]*:[0-9]*)<.td>
attr bundesligaTabelle reading1203Name platz12Punkte
attr bundesligaTabelle reading1203Regex (?s)class="rechts hauptlink">12.*?<td class="zentriert">[0-9]*<.td>.*?<td class="zentriert">([0-9]*)<.td>
attr bundesligaTabelle reading12Name platz12Verein
attr bundesligaTabelle reading12Regex (?s)class="rechts hauptlink">12.*?span><.td>.*?alt="(.*?)" class
attr bundesligaTabelle reading1302Name platz13Torverhaeltnis
attr bundesligaTabelle reading1302Regex (?s)class="rechts hauptlink">13.*?<td class="zentriert">([0-9]*:[0-9]*)<.td>
attr bundesligaTabelle reading1303Name platz13Punkte
attr bundesligaTabelle reading1303Regex (?s)class="rechts hauptlink">13.*?<td class="zentriert">[0-9]*<.td>.*?<td class="zentriert">([0-9]*)<.td>
attr bundesligaTabelle reading13Name platz13Verein
attr bundesligaTabelle reading13Regex (?s)class="rechts hauptlink">13.*?span><.td>.*?alt="(.*?)" class
attr bundesligaTabelle reading1402Name platz14Torverhaeltnis
attr bundesligaTabelle reading1402Regex (?s)class="rechts hauptlink">14.*?<td class="zentriert">([0-9]*:[0-9]*)<.td>
attr bundesligaTabelle reading1403Name platz14Punkte
attr bundesligaTabelle reading1403Regex (?s)class="rechts hauptlink">14.*?<td class="zentriert">[0-9]*<.td>.*?<td class="zentriert">([0-9]*)<.td>
attr bundesligaTabelle reading14Name platz14Verein
attr bundesligaTabelle reading14Regex (?s)class="rechts hauptlink">14.*?span><.td>.*?alt="(.*?)" class
attr bundesligaTabelle reading1502Name platz15Torverhaeltnis
attr bundesligaTabelle reading1502Regex (?s)class="rechts hauptlink">15.*?<td class="zentriert">([0-9]*:[0-9]*)<.td>
attr bundesligaTabelle reading1503Name platz15Punkte
attr bundesligaTabelle reading1503Regex (?s)class="rechts hauptlink">15.*?<td class="zentriert">[0-9]*<.td>.*?<td class="zentriert">([0-9]*)<.td>
attr bundesligaTabelle reading15Name platz15Verein
attr bundesligaTabelle reading15Regex (?s)class="rechts hauptlink">15.*?span><.td>.*?alt="(.*?)" class
attr bundesligaTabelle reading1602Name platz16Torverhaeltnis
attr bundesligaTabelle reading1602Regex (?s)class="rechts hauptlink">16.*?<td class="zentriert">([0-9]*:[0-9]*)<.td>
attr bundesligaTabelle reading1603Name platz16Punkte
attr bundesligaTabelle reading1603Regex (?s)class="rechts hauptlink">16.*?<td class="zentriert">[0-9]*<.td>.*?<td class="zentriert">([0-9]*)<.td>
attr bundesligaTabelle reading16Name platz16Verein
attr bundesligaTabelle reading16Regex (?s)class="rechts hauptlink">16.*?span><.td>.*?alt="(.*?)" class
attr bundesligaTabelle reading1702Name platz17Torverhaeltnis
attr bundesligaTabelle reading1702Regex (?s)class="rechts hauptlink">17.*?<td class="zentriert">([0-9]*:[0-9]*)<.td>
attr bundesligaTabelle reading1703Name platz17Punkte
attr bundesligaTabelle reading1703Regex (?s)class="rechts hauptlink">17.*?<td class="zentriert">[0-9]*<.td>.*?<td class="zentriert">([0-9]*)<.td>
attr bundesligaTabelle reading17Name platz17Verein
attr bundesligaTabelle reading17Regex (?s)class="rechts hauptlink">17.*?span><.td>.*?alt="(.*?)" class
attr bundesligaTabelle reading1802Name platz18Torverhaeltnis
attr bundesligaTabelle reading1802Regex (?s)class="rechts hauptlink">18.*?<td class="zentriert">([0-9]*:[0-9]*)<.td>
attr bundesligaTabelle reading1803Name platz18Punkte
attr bundesligaTabelle reading1803Regex (?s)class="rechts hauptlink">18.*?<td class="zentriert">[0-9]*<.td>.*?<td class="zentriert">([0-9]*)<.td>
attr bundesligaTabelle reading18Name platz18Verein
attr bundesligaTabelle reading18Regex (?s)class="rechts hauptlink">18.*?span><.td>.*?alt="(.*?)" class
attr bundesligaTabelle room Bundesliga,System
attr bundesligaTabelle userReadings reading01Name reading01Regex reading02Name reading02Regex

Geht sicher eleganter aber so ist es jetzt ersteinmal und es funzt. Für Vorschläge bin ich offen.

Da ich tabletUI benutze habe ich keine Readingsgroup gebaut.
Wer möchte kann dies gerne tun und hier posten.

In TabletUi ist diese Tabelle eingebaut:
<li data-row="1" data-col="2" data-sizex="1" data-sizey="3" class="left-align">
<header>Tabelle aktuell</header>

<div class="sheet">
  <div class="row">
<div class="cell-10 border-blue bg-white lightblue big center-align">#</div>
        <div class="cell-50 border-blue bg-white lightblue  big center-align">Verein</div>
        <div class="cell-20 border-blue bg-white lightblue  big center-align">Tore</div>
        <div class="cell-20 border-blue bg-white lightblue  big center-align">Pkt.</div>
    </div>
    <div class="row">
<div class="cell-10  bg-white blue border-gray center-align">01</div>
        <div class="cell-50  big bg-white green border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz01Verein"></div></div>
        <div class="cell-20  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz01Torverhaeltnis"></div></div>
        <div class="cell-20  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz01Punkte"></div></div>
    </div>
    <div class="row">
<div class="cell-10  bg-white blue border-gray center-align">02</div>
        <div class="cell-50  big bg-white mint border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz02Verein"></div></div>
        <div class="cell-20  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz02Torverhaeltnis"></div></div>
        <div class="cell-20  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz02Punkte"></div></div>
    </div>
    <div class="row">
<div class="cell-10  bg-white blue border-gray center-align">03</div>
        <div class="cell-50  big bg-white orange border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz03Verein"></div></div>
        <div class="cell-20  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz03Torverhaeltnis"></div></div>
        <div class="cell-20  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz03Punkte"></div></div>
    </div>
    <div class="row">
<div class="cell-10  bg-white blue border-gray center-align">04</div>
        <div class="cell-50  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz04Verein"></div></div>
        <div class="cell-20  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz04Torverhaeltnis"></div></div>
        <div class="cell-20  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz04Punkte"></div></div>
    </div>
    <div class="row">
<div class="cell-10  bg-white blue border-gray center-align">05</div>
        <div class="cell-50  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz05Verein"></div></div>
        <div class="cell-20  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz05Torverhaeltnis"></div></div>
        <div class="cell-20  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz05Punkte"></div></div>
    </div>
    <div class="row">
<div class="cell-10  bg-white blue border-gray center-align">06</div>
        <div class="cell-50  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz06Verein"></div></div>
        <div class="cell-20  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz06Torverhaeltnis"></div></div>
        <div class="cell-20  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz06Punkte"></div></div>
    </div>
    <div class="row">
<div class="cell-10  bg-white blue border-gray center-align">07</div>
        <div class="cell-50  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz07Verein"></div></div>
        <div class="cell-20  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz07Torverhaeltnis"></div></div>
        <div class="cell-20  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz07Punkte"></div></div>
    </div>
    <div class="row">
<div class="cell-10  bg-white blue border-gray center-align">08</div>
        <div class="cell-50  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz08Verein"></div></div>
        <div class="cell-20  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz08Torverhaeltnis"></div></div>
        <div class="cell-20  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz08Punkte"></div></div>
    </div>
<div class="row">
<div class="cell-10  bg-white blue border-gray center-align">09</div>
        <div class="cell-50  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz09Verein"></div></div>
        <div class="cell-20  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz09Torverhaeltnis"></div></div>
        <div class="cell-20  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz09Punkte"></div></div>
    </div>
<div class="row">
<div class="cell-10  bg-white blue border-gray center-align">10</div>
        <div class="cell-50  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz10Verein"></div></div>
        <div class="cell-20  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz10Torverhaeltnis"></div></div>
        <div class="cell-20  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz10Punkte"></div></div>
    </div>
<div class="row">
<div class="cell-10  bg-white blue border-gray center-align">11</div>
        <div class="cell-50  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz11Verein"></div></div>
        <div class="cell-20  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz11Torverhaeltnis"></div></div>
        <div class="cell-20  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz11Punkte"></div></div>
    </div>
<div class="row">
<div class="cell-10  bg-white blue border-gray center-align">12</div>
        <div class="cell-50  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz12Verein"></div></div>
        <div class="cell-20  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz12Torverhaeltnis"></div></div>
        <div class="cell-20  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz12Punkte"></div></div>
    </div>
<div class="row">
<div class="cell-10  bg-white blue border-gray center-align">13</div>
        <div class="cell-50  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz13Verein"></div></div>
        <div class="cell-20  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz13Torverhaeltnis"></div></div>
        <div class="cell-20  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz13Punkte"></div></div>
    </div>
<div class="row">
<div class="cell-10  bg-white blue border-gray center-align">14</div>
        <div class="cell-50  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz14Verein"></div></div>
        <div class="cell-20  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz14Torverhaeltnis"></div></div>
        <div class="cell-20  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz14Punkte"></div></div>
    </div>
<div class="row">
<div class="cell-10  bg-white blue border-gray center-align">15</div>
        <div class="cell-50  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz15Verein"></div></div>
        <div class="cell-20  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz15Torverhaeltnis"></div></div>
        <div class="cell-20  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz15Punkte"></div></div>
    </div>
<div class="row">
<div class="cell-10  bg-white blue border-gray center-align">16</div>
        <div class="cell-50  bg-white orange border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz16Verein"></div></div>
        <div class="cell-20  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz16Torverhaeltnis"></div></div>
        <div class="cell-20  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz16Punkte"></div></div>
    </div>
<div class="row">
<div class="cell-10  bg-white blue border-gray center-align">17</div>
        <div class="cell-50  bg-white orange border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz17Verein"></div></div>
        <div class="cell-20  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz17Torverhaeltnis"></div></div>
        <div class="cell-20  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz17Punkte"></div></div>
    </div>
<div class="row">
<div class="cell-10  bg-white blue border-gray center-align">18</div>
        <div class="cell-50  bg-white red border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz18Verein"></div></div>
        <div class="cell-20  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz18Torverhaeltnis"></div></div>
        <div class="cell-20  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaTabelle" data-get="platz18Punkte"></div></div>
    </div>
</div>

</li>


Anregungen oder Ideen? immer her damit ;)

Viel Spaß beim nachbauen

Buzzy
... And on the 8th Day God Created The Homeautomation.

ComputerZOO

Hallo buzzmain,

ich habe zwar mit Fussball nix am Hut, aber ich habe es mal bei mir integriert. Funktioniert so wie es soll, aber den Abfrageintervall von 120 Sekunden halte ich für etwas "übertrieben". Es sollte doch ausreichen, die Abfrage auf 86400 (ein Tag) zu setzen und nur an den Spieltagen, auf 1800 (halbstündlich) zu setzen (Oder extern mit nem AT/DOIF die Abfrage anzustossen).

sven.scherf

Hallo,

ich fand deine Schnapsidee super und habe es gleich bei mir aufgenommen.
Ich bin auch kein Fussballfan aber meine Frau :)

Hier habe ich aber ein Problem, wenn ich nun die TabletUI auf meinem Mac oder PC aufrufe ist alles klasse aber auf meinen Tablets funktioniert es einfach nicht.
Es geht weder auf einem Androiden noch auf einem Äppler.

Die Tabelle wird einfach nicht mit den Daten gefüttert, in den Readings ist ja alles vorhanden aber in der TabletUI wird es nicht eingelesen.
Hier habe ich auch mal andere Browser ausgetestet aber auch ohne Erfolg.

Hast Du hier eine Idee wo ich ansetzten könnte ?

Vielen Dank schon mal und viele Grüße

Sven
Raspi 3 mit CUL Stick 433/868MHZ, Homematic

buzzmain

Hallo Sven,

so wirklich habe ich keine Idee.
Klingt ein wenig nach einem Formatierungsproblem.

Wie sieht der code von deinem TabletUI aus?

Hast Du das Codebeispiel in einem Body eingebunden?
... And on the 8th Day God Created The Homeautomation.

sven.scherf

Hallo,

Fehler gefixt.

Ich habe es gefunden und zwar hatte ich in meinem Code

<script src="js/fhem-tablet-ui.js" defer></script> und
<script src="/fhem/tablet/js/fhem-tablet-ui.min.js" defer></script>


Dies ist ja doppelt gemoppelt.

Dann habe ich die zweite Zeile rausgeschmissen und schon ging es.

Das Verrückte an der Sache war ja, dass ich es auf einem Mac erstellt habe und da ging es.
Auf meinen Tablet und auf meinem PC funktionierte hier nicht.

Jetzt geht es auf allen Systemen.


Vielen Dank und Grüße

Sven
Raspi 3 mit CUL Stick 433/868MHZ, Homematic

buzzmain

Zitat von: ComputerZOO am 22 September 2019, 11:22:46
Hallo buzzmain,

ich habe zwar mit Fussball nix am Hut, aber ich habe es mal bei mir integriert. Funktioniert so wie es soll, aber den Abfrageintervall von 120 Sekunden halte ich für etwas "übertrieben". Es sollte doch ausreichen, die Abfrage auf 86400 (ein Tag) zu setzen und nur an den Spieltagen, auf 1800 (halbstündlich) zu setzen (Oder extern mit nem AT/DOIF die Abfrage anzustossen).

Danke, du hast natürlich Recht. alle 2 Minuten ist entschieden zu viel. Ich habe es jetzt auf einen 6 Stunden Takt gestellt. Das sollte den Trafik reduzieren. Da es auch in der Woche mal Spiele gibt habe ich es nicht nach Tagen sortiert.
Danke für den Hinweis

@sven.scherf, super, viel Spaß. Nun muss nur noch der HSV gewinnen und alles wird gut ;)
... And on the 8th Day God Created The Homeautomation.

punker

Schön wäre eine Tabelle der aktuellen Spielstände! ::)
LG

Dieter

The truth is out there!

sven.scherf

Hi,


wenn du eine WebSite mit Spielständen hast die immer aktuell sind kann man sowas doch bauen.

Die Vorlage hier kann man verwenden.

Schicke mal eine Site mit den Ständen, hier kenne ich mich nicht so aus aber für meine Frau wäre dies auch interessant. :)

Vg

Sven
Raspi 3 mit CUL Stick 433/868MHZ, Homematic

punker

werde mal schaun wo es sowas gibt!
LG

Dieter

The truth is out there!

buzzmain

Gute Idee mit den Spielständen des Spieltages. Ich bin schon dran was zu basteln.
mal schauen wie es wird.


... And on the 8th Day God Created The Homeautomation.

Kusselin

Zitat von: sven.scherf am 19 November 2019, 18:46:35
Hi,


wenn du eine WebSite mit Spielständen hast die immer aktuell sind kann man sowas doch bauen.

Die Vorlage hier kann man verwenden.

Schicke mal eine Site mit den Ständen, hier kenne ich mich nicht so aus aber für meine Frau wäre dies auch interessant. :)

Vg

Sven

kann das nicht https://www.kicker.de/bundesliga/startseite


buzzmain

#11
So ihr Lieben, hier die Ergebnisse des aktuellen Spieltages:


define bundesligaSpieltagErgebnisse HTTPMOD https://www.kicker.de/2-bundesliga/spieltag 3600
attr bundesligaSpieltagErgebnisse userattr reading01Name reading01Regex reading02Name reading02Regex reading03Name reading03Regex reading04Name reading04Regex reading05Name reading05Regex reading06Name reading06Regex reading07Name reading07Regex reading08Name reading08Regex reading09Name reading09Regex
attr bundesligaSpieltagErgebnisse enableControlSet 1
attr bundesligaSpieltagErgebnisse enableCookies 1
attr bundesligaSpieltagErgebnisse enforceGoodReadingNames 1
attr bundesligaSpieltagErgebnisse handleRedirects 0
attr bundesligaSpieltagErgebnisse reading01Name spiel01
attr bundesligaSpieltagErgebnisse reading01Regex (?s)Begegnungen.*?name">(.*?) <.*?scoreHolder__score">([0-9]?)<.*?score">([0-9]?)<.*?team__name">(.*?) <
attr bundesligaSpieltagErgebnisse reading02Name spiel02
attr bundesligaSpieltagErgebnisse reading02Regex (?s)Begegnungen.*?Analyse.*?name">(.*?) <.*?scoreHolder__score">([0-9]?)<.*?score">([0-9]?)<.*?team__name">(.*?) <
attr bundesligaSpieltagErgebnisse reading03Name spiel03
attr bundesligaSpieltagErgebnisse reading03Regex (?s)Begegnungen.*?Analyse.*?Analyse.*?name">(.*?) <.*?scoreHolder__score">([0-9]?)<.*?score">([0-9]?)<.*?team__name">(.*?) <
attr bundesligaSpieltagErgebnisse reading04Name spiel04
attr bundesligaSpieltagErgebnisse reading04Regex (?s)Begegnungen.*?Analyse.*?Analyse.*?Analyse.*?name">(.*?) <.*?scoreHolder__score">([0-9]?)<.*?score">([0-9]?)<.*?team__name">(.*?) <
attr bundesligaSpieltagErgebnisse reading05Name spiel05
attr bundesligaSpieltagErgebnisse reading05Regex (?s)Begegnungen.*?Analyse.*?Analyse.*?Analyse.*?Analyse.*?name">(.*?) <.*?scoreHolder__score">([0-9]?)<.*?score">([0-9]?)<.*?team__name">(.*?) <
attr bundesligaSpieltagErgebnisse reading06Name spiel06
attr bundesligaSpieltagErgebnisse reading06Regex (?s)Begegnungen.*?Analyse.*?Analyse.*?Analyse.*?Analyse.*?Analyse.*?name">(.*?) <.*?scoreHolder__score">([0-9]?)<.*?score">([0-9]?)<.*?team__name">(.*?) <
attr bundesligaSpieltagErgebnisse reading07Name spiel07
attr bundesligaSpieltagErgebnisse reading07Regex (?s)Begegnungen.*?Analyse.*?Analyse.*?Analyse.*?Analyse.*?Analyse.*?Analyse.*?name">(.*?) <.*?scoreHolder__score">([0-9]?)<.*?score">([0-9]?)<.*?team__name">(.*?) <
attr bundesligaSpieltagErgebnisse reading08Name spiel08
attr bundesligaSpieltagErgebnisse reading08Regex (?s)Begegnungen.*?Analyse.*?Analyse.*?Analyse.*?Analyse.*?Analyse.*?Analyse.*?Analyse.*?name">(.*?) <.*?scoreHolder__score">([0-9]?)<.*?score">([0-9]?)<.*?team__name">(.*?) <
attr bundesligaSpieltagErgebnisse reading09Name spiel09
attr bundesligaSpieltagErgebnisse reading09Regex (?s)Begegnungen.*?Analyse.*?Analyse.*?Analyse.*?Analyse.*?Analyse.*?Analyse.*?Analyse.*?Analyse.*?name">(.*?) <.*?scoreHolder__score">([0-9]?)<.*?score">([0-9]?)<.*?team__name">(.*?) <
attr bundesligaSpieltagErgebnisse room Bundesliga

Nachtrag:
Ein Reading hat immer vier Werte.
1 - Heimmanschaftsname
2 - Tore der Heimmanschaft
3 - Tore der Gastmanschaft
4 - Gastmanschaftsname



Ins TabletUI bekommt ihr es so oder?

Viel Spaß damit
... And on the 8th Day God Created The Homeautomation.

buzzmain

ups, vergessen...
Für 1. Liga einfach die URL https://www.kicker.de/1-bundesliga/spieltag nehmen..
... And on the 8th Day God Created The Homeautomation.

buzzmain

Auf Wunsch hier einmal für TabletUI die Spieltagsergebnisse:

<li data-row="1" data-col="3" data-sizex="2" data-sizey="1" class="left-align">
<header>Aktueller Spieltag</header>

<div class="sheet">
<div class="row">
<div class="cell-40 border-blue bg-white red big center-align">Heim</div>
<div class="cell-5 border-blue bg-white red  big center-align">#</div>
<div class="cell-10 border-blue bg-white lightblue  big center-align">:</div>
<div class="cell-5 border-blue bg-white lightblue  big center-align">#</div>
<div class="cell-40 border-blue bg-white lightblue  big center-align">Gast</div>
</div>
<div class="row">
<div class="cell-40  bg-white red border-gray center-align"><div data-type="label" data-device="bundesligaSpieltagErgebnisse" data-get="spiel01-1"></div></div>
        <div class="cell-5  bg-white red border-gray center-align"><div data-type="label" data-device="bundesligaSpieltagErgebnisse" data-get="spiel01-2"></div></div>
<div class="cell-10 border-blue bg-white lightblue  big center-align">:</div>
        <div class="cell-5  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaSpieltagErgebnisse" data-get="spiel01-3"></div></div>
        <div class="cell-40  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaSpieltagErgebnisse" data-get="spiel01-4"></div></div>
    </div>
<div class="row">
<div class="cell-40  bg-white red border-gray center-align"><div data-type="label" data-device="bundesligaSpieltagErgebnisse" data-get="spiel02-1"></div></div>
        <div class="cell-5  bg-white red border-gray center-align"><div data-type="label" data-device="bundesligaSpieltagErgebnisse" data-get="spiel02-2"></div></div>
<div class="cell-10 border-blue bg-white lightblue  big center-align">:</div>
        <div class="cell-5  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaSpieltagErgebnisse" data-get="spiel02-3"></div></div>
        <div class="cell-40  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaSpieltagErgebnisse" data-get="spiel02-4"></div></div>
    </div>
<div class="row">
<div class="cell-40  bg-white red border-gray center-align"><div data-type="label" data-device="bundesligaSpieltagErgebnisse" data-get="spiel03-1"></div></div>
        <div class="cell-5  bg-white red border-gray center-align"><div data-type="label" data-device="bundesligaSpieltagErgebnisse" data-get="spiel03-2"></div></div>
<div class="cell-10 border-blue bg-white lightblue  big center-align">:</div>
        <div class="cell-5  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaSpieltagErgebnisse" data-get="spiel03-3"></div></div>
        <div class="cell-40  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaSpieltagErgebnisse" data-get="spiel03-4"></div></div>
    </div>
<div class="row">
<div class="cell-40  bg-white red border-gray center-align"><div data-type="label" data-device="bundesligaSpieltagErgebnisse" data-get="spiel04-1"></div></div>
        <div class="cell-5  bg-white red border-gray center-align"><div data-type="label" data-device="bundesligaSpieltagErgebnisse" data-get="spiel04-2"></div></div>
<div class="cell-10 border-blue bg-white lightblue  big center-align">:</div>
        <div class="cell-5  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaSpieltagErgebnisse" data-get="spiel04-3"></div></div>
        <div class="cell-40  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaSpieltagErgebnisse" data-get="spiel04-4"></div></div>
    </div>
<div class="row">
<div class="cell-40  bg-white red border-gray center-align"><div data-type="label" data-device="bundesligaSpieltagErgebnisse" data-get="spiel05-1"></div></div>
        <div class="cell-5  bg-white red border-gray center-align"><div data-type="label" data-device="bundesligaSpieltagErgebnisse" data-get="spiel05-2"></div></div>
<div class="cell-10 border-blue bg-white lightblue  big center-align">:</div>
        <div class="cell-5  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaSpieltagErgebnisse" data-get="spiel05-3"></div></div>
        <div class="cell-40  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaSpieltagErgebnisse" data-get="spiel05-4"></div></div>
    </div>
<div class="row">
<div class="cell-40  bg-white red border-gray center-align"><div data-type="label" data-device="bundesligaSpieltagErgebnisse" data-get="spiel06-1"></div></div>
        <div class="cell-5  bg-white red border-gray center-align"><div data-type="label" data-device="bundesligaSpieltagErgebnisse" data-get="spiel06-2"></div></div>
<div class="cell-10 border-blue bg-white lightblue  big center-align">:</div>
        <div class="cell-5  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaSpieltagErgebnisse" data-get="spiel06-3"></div></div>
        <div class="cell-40  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaSpieltagErgebnisse" data-get="spiel06-4"></div></div>
    </div>
<div class="row">
<div class="cell-40  bg-white red border-gray center-align"><div data-type="label" data-device="bundesligaSpieltagErgebnisse" data-get="spiel07-1"></div></div>
        <div class="cell-5  bg-white red border-gray center-align"><div data-type="label" data-device="bundesligaSpieltagErgebnisse" data-get="spiel07-2"></div></div>
<div class="cell-10 border-blue bg-white lightblue  big center-align">:</div>
        <div class="cell-5  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaSpieltagErgebnisse" data-get="spiel07-3"></div></div>
        <div class="cell-40  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaSpieltagErgebnisse" data-get="spiel07-4"></div></div>
    </div>
<div class="row">
<div class="cell-40  bg-white red border-gray center-align"><div data-type="label" data-device="bundesligaSpieltagErgebnisse" data-get="spiel08-1"></div></div>
        <div class="cell-5  bg-white red border-gray center-align"><div data-type="label" data-device="bundesligaSpieltagErgebnisse" data-get="spiel08-2"></div></div>
<div class="cell-10 border-blue bg-white lightblue  big center-align">:</div>
        <div class="cell-5  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaSpieltagErgebnisse" data-get="spiel08-3"></div></div>
        <div class="cell-40  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaSpieltagErgebnisse" data-get="spiel08-4"></div></div>
    </div>
<div class="row">
<div class="cell-40  bg-white red border-gray center-align"><div data-type="label" data-device="bundesligaSpieltagErgebnisse" data-get="spiel09-1"></div></div>
        <div class="cell-5  bg-white red border-gray center-align"><div data-type="label" data-device="bundesligaSpieltagErgebnisse" data-get="spiel09-2"></div></div>
<div class="cell-10 border-blue bg-white lightblue  big center-align">:</div>
        <div class="cell-5  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaSpieltagErgebnisse" data-get="spiel09-3"></div></div>
        <div class="cell-40  bg-white blue border-gray center-align"><div data-type="label" data-device="bundesligaSpieltagErgebnisse" data-get="spiel09-4"></div></div>
    </div>
</div>
</li>

... And on the 8th Day God Created The Homeautomation.

punker

Wie kann ich das denn im FHEM Webif als Tabelle oder sowas ähnliches darstellen (habe kein TabletUI)?
LG

Dieter

The truth is out there!