Notdienst Apotheke via jsonmod

Begonnen von binford6000, 27 März 2023, 14:10:27

Vorheriges Thema - Nächstes Thema

grossmaggul

Ja, ich habe das aus Kyleks Beitrag übernommen und mit Deinen Ergänzungen erweitert und auch den von KyleK geänderten Regex für das Token geändert.
Ich habe mir das jetzt auch schon mehrmals angesehen, finde aber den Fehler nicht.:-/

List apotheke

Internals:
  API_LAST_MSG 200
  API_LAST_RES 1701783171.19776
  DEF        https://www.aponet.de/apotheke/notdienstsuche?tx_aponetpharmacy_search[action]=result&tx_aponetpharmacy_search[controller]=Search&&tx_aponetpharmacy_search[search][lat]=50.5346&tx_aponetpharmacy_search[search][lng]=7.0853&tx_aponetpharmacy_search[search][radius]=6&tx_aponetpharmacy_search[token]=[my_token]&type=1981
  FUUID      6561c543-f33f-f310-d0b9-b525a286eb794ea9
  FVERSION  98_JsonMod.pm:0.279330/2023-09-04
  NAME      apotheke
  NEXT      2023-12-06 09:30:00
  NR        541
  SECRETS    my_token
  SOURCE    https://www.aponet.de/apotheke/notdienstsuche?tx_aponetpharmacy_search[action]=result&tx_aponetpharmacy_search[controller]=Search&&tx_aponetpharmacy_search[search][lat]=50.5346&tx_aponetpharmacy_search[search][lng]=7.0853&tx_aponetpharmacy_search[search][radius]=6&tx_aponetpharmacy_search[token]=XXXXXXXXXXXXX&type=1981 (200)
  STATE      <div style="display:table;;width:100%;;"><div style="display:table-row;;width:100%;;"><div style="display:table-cell;;padding:3pt;;width:50%;;text-align:left;;"><a href="https://www.openstreetmap.org/?mlat=50.54616&mlon=7.14078#map=18/50.54616/7.14078" rel="noopener noreferrer" target="_blank" style="font-weight:bold;;">Jesuiten-Apotheke</a> (4.1km)<br /><a href="https://www.openstreetmap.org/directions?engine=fossgis_osrm_car&route=50.5445088%2C7.0991112%3B50.54616%2C7.14078" rel="noopener noreferrer" target="_blank">Hauptstr. 83<br />53474&nbsp;Bad Neuenahr-Ahrweiler</a></div><div style="display:table-cell;;width:50%;;text-align:left;;">Tel.: <a href="tel:+49264128877">02641/28877</a><br />Fax: 02641/78284<br />eMail: <a href="mailto:ARRAY(0x55a9b051d238)">ARRAY(0x55a9b051d238)</a></div></div><div style="display:table-row;;width:100%;;"><div style="display:table-cell;;padding:3pt;;width:50%;;text-align:left;;">Von 05.12.2023 08:30</div><div style="display:table-cell;;width:50%;;text-align:left;;">Bis 06.12.2023 08:30</div></div><div style="display:table-row;;width:100%;;"><div style="display:table-cell;;padding:3pt;;width:50%;;text-align:left;;"><a href="https://www.openstreetmap.org/?mlat=50.6212827&mlon=7.0223977#map=18/50.6212827/7.0223977" rel="noopener noreferrer" target="_blank" style="font-weight:bold;;">Apotheke zur Alten Post</a> (10.6km)<br /><a href="https://www.openstreetmap.org/directions?engine=fossgis_osrm_car&route=50.5445088%2C7.0991112%3B50.6212827%2C7.0223977" rel="noopener noreferrer" target="_blank">Hauptstr. 94<br />53340&nbsp;Meckenheim</a></div><div style="display:table-cell;;width:50%;;text-align:left;;">Tel.: <a href="tel:+4922254040">02225/4040</a><br />Fax: 02225/16800<br />eMail: <a href="mailto:apotheke-zur-alten-post@t-online.de">apotheke-zur-alten-post@t-online.de</a></div></div><div style="display:table-row;;width:100%;;"><div style="display:table-cell;;padding:3pt;;width:50%;;text-align:left;;">Von 05.12.2023 09:00</div><div style="display:table-cell;;width:50%;;text-align:left;;">Bis 06.12.2023 09:00</div></div><div style="display:table-row;;width:100%;;"><div style="display:table-cell;;padding:3pt;;width:50%;;text-align:left;;"><a href="https://www.openstreetmap.org/?mlat=50.5047675&mlon=7.2807499#map=18/50.5047675/7.2807499" rel="noopener noreferrer" target="_blank" style="font-weight:bold;;">St. Viktor-Apotheke</a> (14.3km)<br /><a href="https://www.openstreetmap.org/directions?engine=fossgis_osrm_car&route=50.5445088%2C7.0991112%3B50.5047675%2C7.2807499" rel="noopener noreferrer" target="_blank">Frankenbachstr. 13<br />53498&nbsp;Bad Breisig</a></div><div style="display:table-cell;;width:50%;;text-align:left;;">Tel.: <a href="tel:+49263396617">02633/96617</a><br />Fax: 02633/8198<br />eMail: <a href="mailto:ARRAY(0x55a9af7c0b60)">ARRAY(0x55a9af7c0b60)</a></div></div><div style="display:table-row;;width:100%;;"><div style="display:table-cell;;padding:3pt;;width:50%;;text-align:left;;">Von 05.12.2023 08:30</div><div style="display:table-cell;;width:50%;;text-align:left;;">Bis 06.12.2023 08:30</div></div></div>
  SVN        27933 2023-09-04 13:29:42 UTC
  TYPE      JsonMod
  eventCount 8
  CONFIG:
    IN_REQUEST 0
    SOURCE    https://www.aponet.de/apotheke/notdienstsuche?tx_aponetpharmacy_search[action]=result&tx_aponetpharmacy_search[controller]=Search&&tx_aponetpharmacy_search[search][lat]=50.5346&tx_aponetpharmacy_search[search][lng]=7.0853&tx_aponetpharmacy_search[search][radius]=6&tx_aponetpharmacy_search[token]=[my_token]&type=1981
    SECRET:
  READINGS:
    2023-12-05 14:32:51  00_city        Bad Neuenahr-Ahrweiler
    2023-12-05 14:32:51  00_distance    4.13780782118
    2023-12-05 14:32:51  00_email        ARRAY(0x55a9b051d238)
    2023-12-05 14:32:51  00_end_date    06.12.2023
    2023-12-05 14:32:51  00_end_time    08:30
    2023-12-05 14:32:51  00_fax          02641/78284
    2023-12-05 14:32:51  00_latitude    50.54616
    2023-12-05 14:32:51  00_longitude    7.14078
    2023-12-05 14:32:51  00_map_position https://www.openstreetmap.org/?mlat=50.54616&mlon=7.14078#map=18/50.54616/7.14078
    2023-12-05 14:32:51  00_map_route    https://www.openstreetmap.org/directions?engine=fossgis_osrm_car&route=50.5445088%2C7.0991112%3B50.54616%2C7.14078
    2023-12-05 14:32:51  00_name        Jesuiten-Apotheke
    2023-12-05 14:32:51  00_start_date  05.12.2023
    2023-12-05 14:32:51  00_start_time  08:30
    2023-12-05 14:32:51  00_street      Hauptstr. 83
    2023-12-05 14:32:51  00_tel          02641/28877
    2023-12-05 14:32:51  00_zip          53474
    2023-12-05 14:32:51  01_city        Meckenheim
    2023-12-05 14:32:51  01_distance    10.622216682509999
    2023-12-05 14:32:51  01_email        apotheke-zur-alten-post@t-online.de
    2023-12-05 14:32:51  01_end_date    06.12.2023
    2023-12-05 14:32:51  01_end_time    09:00
    2023-12-05 14:32:51  01_fax          02225/16800
    2023-12-05 14:32:51  01_latitude    50.6212827
    2023-12-05 14:32:51  01_longitude    7.0223977
    2023-12-05 14:32:51  01_map_position https://www.openstreetmap.org/?mlat=50.6212827&mlon=7.0223977#map=18/50.6212827/7.0223977
    2023-12-05 14:32:51  01_map_route    https://www.openstreetmap.org/directions?engine=fossgis_osrm_car&route=50.5445088%2C7.0991112%3B50.6212827%2C7.0223977
    2023-12-05 14:32:51  01_name        Apotheke zur Alten Post
    2023-12-05 14:32:51  01_start_date  05.12.2023
    2023-12-05 14:32:51  01_start_time  09:00
    2023-12-05 14:32:51  01_street      Hauptstr. 94
    2023-12-05 14:32:51  01_tel          02225/4040
    2023-12-05 14:32:51  01_zip          53340
    2023-12-05 14:32:51  02_city        Bad Breisig
    2023-12-05 14:32:51  02_distance    14.2530041196
    2023-12-05 14:32:51  02_email        ARRAY(0x55a9af7c0b60)
    2023-12-05 14:32:51  02_end_date    06.12.2023
    2023-12-05 14:32:51  02_end_time    08:30
    2023-12-05 14:32:51  02_fax          02633/8198
    2023-12-05 14:32:51  02_latitude    50.5047675
    2023-12-05 14:32:51  02_longitude    7.2807499
    2023-12-05 14:32:51  02_map_position https://www.openstreetmap.org/?mlat=50.5047675&mlon=7.2807499#map=18/50.5047675/7.2807499
    2023-12-05 14:32:51  02_map_route    https://www.openstreetmap.org/directions?engine=fossgis_osrm_car&route=50.5445088%2C7.0991112%3B50.5047675%2C7.2807499
    2023-12-05 14:32:51  02_name        St. Viktor-Apotheke
    2023-12-05 14:32:51  02_start_date  05.12.2023
    2023-12-05 14:32:51  02_start_time  08:30
    2023-12-05 14:32:51  02_street      Frankenbachstr. 13
    2023-12-05 14:32:51  02_tel          02633/96617
    2023-12-05 14:32:51  02_zip          53498
    2023-12-05 14:32:51  03_city        Weibern
    2023-12-05 14:32:51  03_distance    14.850264316139999
    2023-12-05 14:32:51  03_email        ARRAY(0x55a9b104dc00)
    2023-12-05 14:32:51  03_end_date    06.12.2023
    2023-12-05 14:32:51  03_end_time    08:30
    2023-12-05 14:32:51  03_fax          02655/4267
    2023-12-05 14:32:51  03_latitude    50.40632
    2023-12-05 14:32:51  03_longitude    7.14322
    2023-12-05 14:32:51  03_map_position https://www.openstreetmap.org/?mlat=50.40632&mlon=7.14322#map=18/50.40632/7.14322
    2023-12-05 14:32:51  03_map_route    https://www.openstreetmap.org/directions?engine=fossgis_osrm_car&route=50.5445088%2C7.0991112%3B50.40632%2C7.14322
    2023-12-05 14:32:51  03_name        St. Barbara-Apotheke
    2023-12-05 14:32:51  03_start_date  05.12.2023
    2023-12-05 14:32:51  03_start_time  08:30
    2023-12-05 14:32:51  03_street      Eichertstr. 6
    2023-12-05 14:32:51  03_tel          02655/3333
    2023-12-05 14:32:51  03_zip          56745
    2023-12-05 14:32:51  04_city        Bad Honnef
    2023-12-05 14:32:51  04_distance    15.839427894970001
    2023-12-05 14:32:51  04_email        brunnen-apotheke-bad-honnef@t-online.de
    2023-12-05 14:32:51  04_end_date    06.12.2023
    2023-12-05 14:32:51  04_end_time    09:00
    2023-12-05 14:32:51  04_fax          +49 2224 2093
    2023-12-05 14:32:51  04_latitude    50.645269
    2023-12-05 14:32:51  04_longitude    7.2260401
    2023-12-05 14:32:51  04_map_position https://www.openstreetmap.org/?mlat=50.645269&mlon=7.2260401#map=18/50.645269/7.2260401
    2023-12-05 14:32:51  04_map_route    https://www.openstreetmap.org/directions?engine=fossgis_osrm_car&route=50.5445088%2C7.0991112%3B50.645269%2C7.2260401
    2023-12-05 14:32:51  04_name        Brunnen-Apotheke
    2023-12-05 14:32:51  04_start_date  05.12.2023
    2023-12-05 14:32:51  04_start_time  09:00
    2023-12-05 14:32:51  04_street      Hauptstr. 44
    2023-12-05 14:32:51  04_tel          +49 2224 3618
    2023-12-05 14:32:51  04_zip          53604
    2023-12-05 14:32:51  05_city        Bonn
    2023-12-05 14:32:51  05_distance    17.36996691938
    2023-12-05 14:32:51  05_email        info@alte-apotheke.com
    2023-12-05 14:32:51  05_end_date    06.12.2023
    2023-12-05 14:32:51  05_end_time    09:00
    2023-12-05 14:32:51  05_fax          0228/353003
    2023-12-05 14:32:51  05_latitude    50.6843225
    2023-12-05 14:32:51  05_longitude    7.1549667
    2023-12-05 14:32:51  05_map_position https://www.openstreetmap.org/?mlat=50.6843225&mlon=7.1549667#map=18/50.6843225/7.1549667
    2023-12-05 14:32:51  05_map_route    https://www.openstreetmap.org/directions?engine=fossgis_osrm_car&route=50.5445088%2C7.0991112%3B50.6843225%2C7.1549667
    2023-12-05 14:32:51  05_name        Alte Apotheke
    2023-12-05 14:32:51  05_start_date  05.12.2023
    2023-12-05 14:32:51  05_start_time  09:00
    2023-12-05 14:32:51  05_street      Koblenzerstr. 58
    2023-12-05 14:32:51  05_tel          0228/353001
    2023-12-05 14:32:51  05_zip          53173
    2023-12-05 14:32:51  06_city        Vettelschoß
    2023-12-05 14:32:51  06_distance    20.21949734024
    2023-12-05 14:32:51  06_email        ARRAY(0x55a9b0f4dea8)
    2023-12-05 14:32:51  06_end_date    06.12.2023
    2023-12-05 14:32:51  06_end_time    08:30
    2023-12-05 14:32:51  06_fax          02645/8351
    2023-12-05 14:32:51  06_latitude    50.6155015
    2023-12-05 14:32:51  06_longitude    7.3409052
    2023-12-05 14:32:51  06_map_position https://www.openstreetmap.org/?mlat=50.6155015&mlon=7.3409052#map=18/50.6155015/7.3409052
    2023-12-05 14:32:51  06_map_route    https://www.openstreetmap.org/directions?engine=fossgis_osrm_car&route=50.5445088%2C7.0991112%3B50.6155015%2C7.3409052
    2023-12-05 14:32:51  06_name        Rosen-Apotheke
    2023-12-05 14:32:51  06_start_date  05.12.2023
    2023-12-05 14:32:51  06_start_time  08:30
    2023-12-05 14:32:51  06_street      Michaelstr. 59
    2023-12-05 14:32:51  06_tel          02645/2535
    2023-12-05 14:32:51  06_zip          53560
    2023-12-05 14:32:51  07_city        Bonn
    2023-12-05 14:32:51  07_distance    20.93491397592
    2023-12-05 14:32:51  07_email        info@flora-apotheke-bonn.de
    2023-12-05 14:32:51  07_end_date    06.12.2023
    2023-12-05 14:32:51  07_end_time    09:00
    2023-12-05 14:32:51  07_fax          0228/265441
    2023-12-05 14:32:51  07_latitude    50.7227798
    2023-12-05 14:32:51  07_longitude    7.0889295
    2023-12-05 14:32:51  07_map_position https://www.openstreetmap.org/?mlat=50.7227798&mlon=7.0889295#map=18/50.7227798/7.0889295
    2023-12-05 14:32:51  07_map_route    https://www.openstreetmap.org/directions?engine=fossgis_osrm_car&route=50.5445088%2C7.0991112%3B50.7227798%2C7.0889295
    2023-12-05 14:32:51  07_name        Flora Apotheke
    2023-12-05 14:32:51  07_start_date  05.12.2023
    2023-12-05 14:32:51  07_start_time  09:00
    2023-12-05 14:32:51  07_street      Clemens-August-Str. 42
    2023-12-05 14:32:51  07_tel          0228/222485
    2023-12-05 14:32:51  07_zip          53115
    2023-12-05 14:32:51  08_city        Bonn
    2023-12-05 14:32:51  08_distance    21.89579935094
    2023-12-05 14:32:51  08_email        Sonnen-apotheke-beuel@t-online.de
    2023-12-05 14:32:51  08_end_date    06.12.2023
    2023-12-05 14:32:51  08_end_time    09:00
    2023-12-05 14:32:51  08_fax          0228/4337156
    2023-12-05 14:32:51  08_latitude    50.7274709
    2023-12-05 14:32:51  08_longitude    7.1470707
    2023-12-05 14:32:51  08_map_position https://www.openstreetmap.org/?mlat=50.7274709&mlon=7.1470707#map=18/50.7274709/7.1470707
    2023-12-05 14:32:51  08_map_route    https://www.openstreetmap.org/directions?engine=fossgis_osrm_car&route=50.5445088%2C7.0991112%3B50.7274709%2C7.1470707
    2023-12-05 14:32:51  08_name        Sonnen-Apotheke
    2023-12-05 14:32:51  08_start_date  05.12.2023
    2023-12-05 14:32:51  08_start_time  09:00
    2023-12-05 14:32:51  08_street      Königswinterer Str. 306
    2023-12-05 14:32:51  08_tel          0228/442135
    2023-12-05 14:32:51  08_zip          53227
    2023-12-05 14:32:51  09_city        Euskirchen
    2023-12-05 14:32:51  09_distance    22.131783261960003
    2023-12-05 14:32:51  09_email        muehlen-apotheke.eu@t-online.de
    2023-12-05 14:32:51  09_end_date    06.12.2023
    2023-12-05 14:32:51  09_end_time    09:00
    2023-12-05 14:32:51  09_fax          +49 2251 64028
    2023-12-05 14:32:51  09_latitude    50.6313008
    2023-12-05 14:32:51  09_longitude    6.8122083
    2023-12-05 14:32:51  09_map_position https://www.openstreetmap.org/?mlat=50.6313008&mlon=6.8122083#map=18/50.6313008/6.8122083
    2023-12-05 14:32:51  09_map_route    https://www.openstreetmap.org/directions?engine=fossgis_osrm_car&route=50.5445088%2C7.0991112%3B50.6313008%2C6.8122083
    2023-12-05 14:32:51  09_name        Mühlen-Apotheke
    2023-12-05 14:32:51  09_start_date  05.12.2023
    2023-12-05 14:32:51  09_start_time  09:00
    2023-12-05 14:32:51  09_street      Raiffeisenplatz 10
    2023-12-05 14:32:51  09_tel          +49 2251 63443
    2023-12-05 14:32:51  09_zip          53881
    2023-12-05 14:32:51  10_city        Alfter
    2023-12-05 14:32:51  10_distance    23.19001191691
    2023-12-05 14:32:51  10_email        info@apotheke-alfter.de
    2023-12-05 14:32:51  10_end_date    06.12.2023
    2023-12-05 14:32:51  10_end_time    09:00
    2023-12-05 14:32:51  10_fax          02222/660155
    2023-12-05 14:32:51  10_latitude    50.7374322
    2023-12-05 14:32:51  10_longitude    7.0096094
    2023-12-05 14:32:51  10_map_position https://www.openstreetmap.org/?mlat=50.7374322&mlon=7.0096094#map=18/50.7374322/7.0096094
    2023-12-05 14:32:51  10_map_route    https://www.openstreetmap.org/directions?engine=fossgis_osrm_car&route=50.5445088%2C7.0991112%3B50.7374322%2C7.0096094
    2023-12-05 14:32:51  10_name        Bären-Apotheke
    2023-12-05 14:32:51  10_start_date  05.12.2023
    2023-12-05 14:32:51  10_start_time  09:00
    2023-12-05 14:32:51  10_street      Am Herrenwingert 6
    2023-12-05 14:32:51  10_tel          02222/5068
    2023-12-05 14:32:51  10_zip          53347
    2023-12-05 14:32:51  11_city        Nettersheim
    2023-12-05 14:32:51  11_distance    27.40465727682
    2023-12-05 14:32:51  11_email        lambertus@apotheke-tondorf.de
    2023-12-05 14:32:51  11_end_date    06.12.2023
    2023-12-05 14:32:51  11_end_time    09:00
    2023-12-05 14:32:51  11_fax          02440/9599882
    2023-12-05 14:32:51  11_latitude    50.4727746
    2023-12-05 14:32:51  11_longitude    6.7113751
    2023-12-05 14:32:51  11_map_position https://www.openstreetmap.org/?mlat=50.4727746&mlon=6.7113751#map=18/50.4727746/6.7113751
    2023-12-05 14:32:51  11_map_route    https://www.openstreetmap.org/directions?engine=fossgis_osrm_car&route=50.5445088%2C7.0991112%3B50.4727746%2C6.7113751
    2023-12-05 14:32:51  11_name        Lambertus Apotheke Michael und Verena Lülsdorff OHG
    2023-12-05 14:32:51  11_start_date  05.12.2023
    2023-12-05 14:32:51  11_start_time  09:00
    2023-12-05 14:32:51  11_street      Euskirchener Straße 38
    2023-12-05 14:32:51  11_tel          02440/9599880
    2023-12-05 14:32:51  11_zip          53947
Attributes:
  DbLogExclude .*
  alias      Notdienstapotheke
  interval  30 9 * * *
  osm_engine fossgis_osrm_car
  readingList multi(jsonPath("\$.results.apotheken.apotheke.[*]"), concat(sprintf('%02d', count()),"_name"), property('.name'));
multi(jsonPath("\$.results.apotheken.apotheke.[*]"), concat(sprintf('%02d', count()),"_street"), property('.strasse'));
multi(jsonPath("\$.results.apotheken.apotheke.[*]"), concat(sprintf('%02d', count()),"_zip"), property('.plz'));
multi(jsonPath("\$.results.apotheken.apotheke.[*]"), concat(sprintf('%02d', count()),"_city"), property('.ort'));
multi(jsonPath("\$.results.apotheken.apotheke.[*]"), concat(sprintf('%02d', count()),"_tel"), property('.telefon'));
multi(jsonPath("\$.results.apotheken.apotheke.[*]"), concat(sprintf('%02d', count()),"_fax"), property('.fax'));
multi(jsonPath("\$.results.apotheken.apotheke.[*]"), concat(sprintf('%02d', count()),"_email"), property('.email'));
multi(jsonPath("\$.results.apotheken.apotheke.[*]"), concat(sprintf('%02d', count()),"_distance"), property('.distanz'));
multi(jsonPath("\$.results.apotheken.apotheke.[*]"), concat(sprintf('%02d', count()),"_longitude"), property('.longitude'));
multi(jsonPath("\$.results.apotheken.apotheke.[*]"), concat(sprintf('%02d', count()),"_latitude"), property('.latitude'));
multi(jsonPath("\$.results.apotheken.apotheke.[*]"), concat(sprintf('%02d', count()),"_start_date"), property('.startdatum'));
multi(jsonPath("\$.results.apotheken.apotheke.[*]"), concat(sprintf('%02d', count()),"_start_time"), property('.startzeit'));
multi(jsonPath("\$.results.apotheken.apotheke.[*]"), concat(sprintf('%02d', count()),"_end_date"), property('.enddatum'));
multi(jsonPath("\$.results.apotheken.apotheke.[*]"), concat(sprintf('%02d', count()),"_end_time"), property('.endzeit'));
multi(jsonPath("\$.results.apotheken.apotheke.[*]"), concat(sprintf('%02d', count()),"_map_position"), concat("https:\/\/www.openstreetmap.org\/?mlat=", property('.latitude'), "&mlon=", property('.longitude'), "#map=18\/", property('.latitude'), "\/", property('.longitude')));
multi(jsonPath("\$.results.apotheken.apotheke.[*]"), concat(sprintf('%02d', count()),"_map_route"), concat("https:\/\/www.openstreetmap.org\/directions?engine=", AttrVal($name,"osm_engine","fossgis_osrm_car"), "&route=", AttrVal("global","latitude","0"), "%2C", AttrVal("global","longitude","0"), "%3B" , property('.latitude'), "%2C", property('.longitude')));
  stateFormat { my $ret .= "<div style=\"display:table;;width:100%;;\">";; #table
    for(my $i = 0;$i <= 2;$i++)
    {
        my $id = sprintf('%02d', $i);;
        $ret .= "<div style=\"display:table-row;;width:100%;;\">";; #row
            $ret .= "<div style=\"display:table-cell;;padding:3pt;;width:50%;;text-align:left;;\">";; #cell
                $ret .= "<a href=\"".ReadingsVal($name,$id."_map_position","https:\/\/www.osm.org");;
                $ret .= "\" rel=\"noopener noreferrer\" target=\"_blank\" style=\"font-weight:bold;;\">".ReadingsVal($name,$id."_name","?")."</a>";;
                $ret .= " (".sprintf("%.1f", ReadingsNum($name,$id."_distance",0))."km)<br /\>";;
                $ret .= "<a href=\"".ReadingsVal($name,$id."_map_route","https:\/\/www.osm.org")."\" rel=\"noopener noreferrer\" target=\"_blank\">";;
                $ret .= ReadingsVal($name,$id."_street","")."<br /\>";;
                $ret .= ReadingsVal($name,$id."_zip","")."&nbsp;".ReadingsVal($name,$id."_city","");;
                $ret .= "</a>";;
            $ret .= "</div>";; #/cell
            $ret .= "<div style=\"display:table-cell;;width:50%;;text-align:left;;\">";; #cell
                my $numberlink = ReadingsVal($name,$id."_tel","");;
                $numberlink =~ s/\s+//g;;
                $numberlink =~ s/\///g;;
                $ret .= "Tel.: <a href=\"tel:+49".substr($numberlink, 1)."\">".ReadingsVal($name,$id."_tel","")."</a><br />";;
                $ret .= "Fax: ".ReadingsVal($name,$id."_fax","")."<br />";;
                $ret .= "eMail: <a href=\"mailto:".ReadingsVal($name,$id."_email","")."\">".ReadingsVal($name,$id."_email","")."</a>";;
            $ret .= "</div>";; #/cell
        $ret .= "</div>";; #/row
        $ret .= "<div style=\"display:table-row;;width:100%;;\">";; #row
            $ret .= "<div style=\"display:table-cell;;padding:3pt;;width:50%;;text-align:left;;\">";; #cell
                $ret .= "Von ".ReadingsVal($name,$id."_start_date","")." ".ReadingsVal($name,$id."_start_time","");;
            $ret .= "</div>";; #/cell
            $ret .= "<div style=\"display:table-cell;;width:50%;;text-align:left;;\">";; #cell
                $ret .= "Bis ".ReadingsVal($name,$id."_end_date","")." ".ReadingsVal($name,$id."_end_time","");;
            $ret .= "</div>";; #/cell
        $ret .= "</div>";; #/row
    }
    $ret .= "</div>";; #/table
    return $ret;;
}
  userattr  osm_engine:graphhopper_car,fossgis_osrm_car,fossgis_valhalla_car,graphhopper_bicycle,fossgis_osrm_bike,fossgis_valhalla_bicycle,graphhopper_foot,fossgis_osrm_foot,fossgis_valhalla_foot

List apotheke_token

Internals:
  BUSY      0
  DEF        none 0
  FUUID      6561c520-f33f-f310-6c0b-872fb600fc7414e9
  FVERSION  98_HTTPMOD.pm:0.277140/2023-06-29
  Interval  0
  MainURL   
  ModuleVersion 4.1.16 - 4.4.2023
  NAME      apotheke_token
  NOTIFYDEV  global
  NR        540
  NTFY_ORDER 50-apotheke_token
  STATE      ???
  TYPE      HTTPMOD
  eventCount 3
  value     
  CompiledRegexes:
  HttpUtils:
    NAME     
    addr      https://www.aponet.de:443
    auth      0
    buf       
    code      200
    compress  1
    conn     
    data     
    displayurl https://www.aponet.de/typo3temp/assets/compressed/pharmacymap-3632d5053cd86d3c76729f1088c9bc80.js
    header   
    host      www.aponet.de
    httpheader HTTP/1.1 200 OK
Date: Tue, 05 Dec 2023 13:32:32 GMT
Server: Apache/2.4.38 (Debian)
Upgrade: h2
Connection: Upgrade, close
Last-Modified: Tue, 05 Dec 2023 01:00:02 GMT
Accept-Ranges: bytes
Cache-Control: max-age=31536000
Expires: Wed, 04 Dec 2024 13:32:32 GMT
Vary: Accept-Encoding
Content-Encoding: gzip
X-Content-Type-Options: nosniff
Content-Length: 5167
Content-Type: application/javascript; charset=utf-8
    httpversion 1.0
    hu_blocking 0
    hu_filecount 1
    hu_port    443
    hu_portSfx
    ignoreredirects 1
    loglevel  4
    path      /typo3temp/assets/compressed/pharmacymap-3632d5053cd86d3c76729f1088c9bc80.js
    protocol  https
    redirects  0
    timeout    2
    url        https://www.aponet.de/typo3temp/assets/compressed/pharmacymap-3632d5053cd86d3c76729f1088c9bc80.js
    sslargs:
  QUEUE:
  READINGS:
    2023-12-05 14:32:32  pharmacymap    /typo3temp/assets/compressed/pharmacymap-3632d5053cd86d3c76729f1088c9bc80.js
    2023-12-05 14:32:32  token          dFvsmbi%2FG4A
  REQUEST:
    context    get
    data     
    header   
    ignoreredirects 0
    num        2
    retryCount 0
    type      get2
    url        https://www.aponet.de%%value%%
  defptr:
    readingBase:
      pharmacymap get
      token      get
    readingNum:
      pharmacymap 1
      token      2
    readingOutdated:
    requestReadings:
      get1:
        pharmacymap get 1
      get2:
        token      get 2
  lastpoll:
    pharmacymap 1701783151.81716
    token      1701783151.81716
Attributes:
  DbLogExclude .*
  event-on-change-reading .*
  get1FollowGet token
  get1Name  pharmacymap
  get1Poll  1
  get1Regex  src="(\/typo3temp\/assets\/compressed\/pharmacymap-\w+?\.js)
  get1URL    https://www.aponet.de/apotheke/notdienstsuche
  get2Name  token
  get2OExpr  $val=urlEncode($val)
  get2Poll  1
  get2PollDelay 5
  get2Regex  randomToken\s*=\s*'(.+?)'
  get2URL    https://www.aponet.de%%value%%
  replacement2Mode reading
  replacement2Regex %%value%%
  replacement2Value pharmacymap

Doif
Internals:
  DEF        ([apotheke_token:token]) (set apotheke secret my_token [apotheke_token:token])
  FUUID      6561c554-f33f-f310-515b-f9cc19105184fb3e
  FVERSION  98_DOIF.pm:0.277400/2023-07-10
  MODEL      FHEM
  NAME      di.apotheke
  NOTIFYDEV  global,apotheke_token
  NR        542
  NTFY_ORDER 50-di.apotheke
  STATE      cmd_1
  TYPE      DOIF
  VERSION    27740 2023-07-10 09:31:11
  eventCount 1
  READINGS:
    2023-12-05 14:32:32  Device          apotheke_token
    2023-12-05 14:32:42  cmd            1
    2023-12-05 14:32:42  cmd_event      apotheke_token
    2023-12-05 14:32:42  cmd_nr          1
    2023-12-05 14:32:32  e_apotheke_token_token dFvsmbi%2FG4A
    2023-11-29 11:09:42  mode            enabled
    2023-12-05 14:32:42  state          cmd_1
  Regex:
    accu:
    bar:
    barAvg:
    collect:
    cond:
      apotheke_token:
        0:
          token      ^apotheke_token$:^token:
  attr:
    cmdState:
    wait:
    waitdel:
  condition:
    0          ::ReadingValDoIf($hash,'apotheke_token','token')
  do:
    0:
      0          set apotheke secret my_token [apotheke_token:token]
    1:
  helper:
    NOTIFYDEV  global,apotheke_token
    event      token: dFvsmbi%2FG4A
    globalinit 1
    last_timer 0
    sleeptimer -1
    timerdev  apotheke_token
    timerevent token: dFvsmbi%2FG4A
    triggerDev apotheke_token
    DOIF_eventa:
      cmd_nr: 1
      cmd: 1
      cmd_event: apotheke_token
      cmd_1
    DOIF_eventas:
      cmd_nr: 1
      cmd: 1
      cmd_event: apotheke_token
      state: cmd_1
    timerevents:
      token: dFvsmbi%2FG4A
    timereventsState:
      token: dFvsmbi%2FG4A
    triggerEvents:
      token: dFvsmbi%2FG4A
    triggerEventsState:
      token: dFvsmbi%2FG4A
  internals:
  perlblock:
  readings:
    all        apotheke_token:token
  trigger:
  uiState:
  uiTable:
Attributes:
  DbLogExclude .*
  do        always

Und das AT
Internals:
  COMMAND    set apotheke_token reread;; sleep 5;; set apotheke secret my_token [apotheke_token:token]
  DEF        *08:35:00 set apotheke_token reread;; sleep 5;; set apotheke secret my_token [apotheke_token:token]
  FUUID      6561c565-f33f-f310-0ad3-40c8b39bd7e27af2
  FVERSION  90_at.pm:0.280040/2023-09-28
  NAME      apotheke_reload
  NR        543
  PERIODIC  yes
  RELATIVE  no
  REP        -1
  STATE      Next: 08:35:00
  TIMESPEC  08:35:00
  TRIGGERTIME 1701848100
  TRIGGERTIME_FMT 2023-12-06 08:35:00
  TYPE      at
  eventCount 3
  READINGS:
    2023-12-05 14:31:57  state          Next: 08:35:00
Attributes:
  DbLogExclude .*
FHEM auf Debian 12 Bookworm Server, Supermicro Core2Duo Board, 2 TB HD RAID 1, 8GB RAM, 2 x nanoCUL868, 1 x nanoCUL465; Homematic, MAX, MiLight, HUE,  2 x Gosund SP1,WLED

yersinia

Die Timestamps der Readings sehen für mich passabel aus, die Kombination at-httpmod-doif-jsonmod scheint mAn zu funktionieren. Die Frage wäre, warum es morgens dann nicht triggert.
Gibt es Log-Einträge?

Warum nutzt du DOIF und at - es müsste doch eines von beiden reichen. Dein DOIF triggert sogar auf die token-Änderung. Möglicherweise kommen sich at und DOIF hier in die Quere.

Ich persönlich nutze DOIF, für dich wäre das in etwa (mit Zufallszeiten)
defmod di.apotheke DOIF ([([08:30]+int(rand(120)))])\
(set apotheke_token reread)\
(set apotheke secret my_token [apotheke_token:token])\
(set apotheke reread)
attr di.apotheke DbLogExclude .*
attr di.apotheke do always
attr di.apotheke wait 0,10,rand(30)+20
attr di.apotheke webCmd cmd1
attr di.apotheke webCmdLabel Trigger Update
Das at würde ich dann deaktivieren. Oder ohne Doif aber mit at in etwa so (ungetestet):
*08:35:00 set apotheke_token reread;; sleep 5;; set apotheke secret my_token [apotheke_token:token];; sleep 5;; set apotheke reread
Weiterhin sollte das JsonMod Device kein Intervall haben, du aktualisierst ja manuell - setze das Attribut disable auf 1.
viele Grüße, yersinia
----
FHEM 6.3 (SVN) on RPi 4B with RasPi OS Bullseye (perl 5.32.1) | FTUI
nanoCUL->2x868(1x ser2net)@tsculfw, 1x433@Sduino | MQTT2 | Tasmota | ESPEasy
VCCU->14xSEC-SCo, 7xCC-RT-DN, 5xLC-Bl1PBU-FM, 3xTC-IT-WM-W-EU, 1xPB-2-WM55, 1xLC-Sw1PBU-FM, 1xES-PMSw1-Pl

grossmaggul

Danke!

ZitatWarum nutzt du DOIF und at
Das weiß ich ehrlich gesagt auch nicht.:-/

Ich werde mal Deine Änderungen einpflegen, mal sehen.
FHEM auf Debian 12 Bookworm Server, Supermicro Core2Duo Board, 2 TB HD RAID 1, 8GB RAM, 2 x nanoCUL868, 1 x nanoCUL465; Homematic, MAX, MiLight, HUE,  2 x Gosund SP1,WLED

grossmaggul

FHEM auf Debian 12 Bookworm Server, Supermicro Core2Duo Board, 2 TB HD RAID 1, 8GB RAM, 2 x nanoCUL868, 1 x nanoCUL465; Homematic, MAX, MiLight, HUE,  2 x Gosund SP1,WLED

Sailor

Moin zusammen

Nur zum Verständnis.

Mittels

https://www.aponet.de/typo3temp/assets/compressed/pharmacymap-3632d5053cd86d3c76729f1088c9bc80.js

bekomme ich einen Code in welchem ich die Textstelle
// Random String, generated by Typo3 Task. Do not change anything between these Comments
/*** start random tokens ***/
var randomToken = 'aFvsmbi/G4A';
/*** end random tokens ***/

suche und "aFvsmbi/G4A" extrahiere.

Dies füge ich dann in

https://www.aponet.de/apotheke/notdienstsuche?tx_aponetpharmacy_search[action]=result&tx_aponetpharmacy_search[controller]=Search&&tx_aponetpharmacy_search[search][lat]=53.5889281&tx_aponetpharmacy_search[search][lng]=9.6222632&tx_aponetpharmacy_search[search][radius]=60&tx_aponetpharmacy_search[token]=aFvsmbi/G4A&type=1981

ein und bekomme die Apotheken als JSON - String?

Warum ist dann das Ergebnis bei mir leer?

{"alerts":[],"settings":{"interface":"emergency","singleViewUid":"261"},"args":{"action":"result","controller":"Search","search":{"lat":"50.5346","lng":"7.0853","radius":"60"},"token":"dFvsmbi\/G4A"},"results":[]}
Irgendwas verstehe ich nicht oder mache ich falsch...

Danke Euch für die Aufklärung/Erklärung!

Gruß
    Sailor

PS: Token hier im Beitrag verändert
******************************
Man wird immer besser...

betateilchen

Mach mal den Radius kleiner, z.B. auf 8.
-----------------------
Formuliere die Aufgabe möglichst einfach und
setze die Lösung richtig um - dann wird es auch funktionieren.
-----------------------
Lesen gefährdet die Unwissenheit!

Christoph Morrison

Das Token ist kein Geheimnis, das brauchst du nicht ändern.

Hast du aber zwischen deinem Beitrag und deinem Request die Koordinaten geändert? Das einemal Mitten in der Elbe, das andere mal bei einem offenbar nicht minder gefährlichen Gewässer in Bad Neuenahr.

betateilchen

Deshalb verwende ich die Suche nach der Postleitzahl.

Aber zum Testen hatte ich den von Sailor angegebenen Link (mit den Elbe-Koordinaten, da ich seinen Wohnort kenne) verwendet. Mit radius=60 blieb bei mir das Ergebnis auch leer, mit radius=8 kamen die gewünschten Ergebnisse.
In der json-Auswertung habe ich den Filter in der Ergebnisliste dann noch auf die Apotheken in Niedersachsen eingestellt.
-----------------------
Formuliere die Aufgabe möglichst einfach und
setze die Lösung richtig um - dann wird es auch funktionieren.
-----------------------
Lesen gefährdet die Unwissenheit!

Sailor

Hallo betateilchen

Zitat von: betateilchen am 08 Dezember 2023, 20:51:04Mach mal den Radius kleiner, z.B. auf 8.

Selbst mit
https://www.aponet.de/apotheke/notdienstsuche?tx_aponetpharmacy_search[action]=result&tx_aponetpharmacy_search[controller]=Search&&tx_aponetpharmacy_search[search][lat]=53.5889281&tx_aponetpharmacy_search[search][lng]=9.6222632&tx_aponetpharmacy_search[search][radius]=8&tx_aponetpharmacy_search[token]=dFvsmbi/G4A&type=1981

kommt nur
{"alerts":[],"settings":{"interface":"emergency","singleViewUid":"261"},"args":{"action":"result","controller":"Search","search":{"lat":"53.5889281","lng":"9.6222632","radius":"8"},"token":"dFvsmbi\/G4A"},"results":[]}

Also leere "results".

Ich kann mir nicht vorstellen, dass das am Firefox - Browser unter Ubuntu liegt.

Und du bekommst bei dem Link hier Resultate angezeigt? :o

Ich bin ratlos.

Gruß
    Sailor
******************************
Man wird immer besser...

yersinia

Kurios
https://www.aponet.de/apotheke/notdienstsuche?tx_aponetpharmacy_search[action]=result&tx_aponetpharmacy_search[controller]=Search&&tx_aponetpharmacy_search[search][lat]=53.5889281&tx_aponetpharmacy_search[search][lng]=9.6222632&tx_aponetpharmacy_search[search][radius]=8&tx_aponetpharmacy_search[token]=pbOJsjDNv3I&type=1981
liefert
{
  "alerts": [],
  "settings": {
    "interface": "emergency",
    "singleViewUid": "261"
  },
  "args": {
    "action": "result",
    "controller": "Search",
    "search": {
      "lat": "53.5889281",
      "lng": "9.6222632",
      "radius": 28
    },
    "token": "pbOJsjDNv3I"
  },
  "results": {
    "parameter": {
      "plzort": [],
      "strasse": [],
      "radius": "28",
      "longitude": "9.6222632",
      "latitude": "53.5889281",
      "limit": [],
      "datum": []
    },
    "statistik": {
      "anzahl": 15
    },
    "quota": {
      "verwendet": "13260"
    },
    "apotheken": {
      "apotheke": [
        {
          "name": "Falken-Apotheke",
          "kammer": "aknds",
          "id": "1289",
          "apo_id": "aknds1289",
          "strasse": "Im Kleinen Sande 5",
          "plz": "21640",
          "ort": "Horneburg",
          "distanz": "9.478236625800001",
          "longitude": "9.5793579",
          "latitude": "53.50769",
          "telefon": "04163-81570",
          "fax": "04163-815716",
          "email": [],
          "startdatum": "14.12.2023",
          "startzeit": "08:00",
          "enddatum": "15.12.2023",
          "endzeit": "08:00"
        },
        {
          "name": "Apotheke am Hohenwedel",
          "kammer": "aknds",
          "id": "1448",
          "apo_id": "aknds1448",
          "strasse": "Hohenwedeler Weg 1",
          "plz": "21682",
          "ort": "Stade",
          "distanz": "10.71480585794",
          "longitude": "9.4629407",
          "latitude": "53.6058369",
          "telefon": "04141-81155",
          "fax": "04141-84763",
          "email": [],
          "startdatum": "14.12.2023",
          "startzeit": "08:30",
          "enddatum": "15.12.2023",
          "endzeit": "08:30"
        },
        {
          "name": "Pluspunkt Apotheke Uetersen",
          "kammer": "aksh",
          "id": "10809",
          "apo_id": "aksh10809",
          "strasse": "Großer Sand 12",
          "plz": "25436",
          "ort": "Uetersen",
          "distanz": "10.84441093758",
          "longitude": "9.6655415",
          "latitude": "53.6829075",
          "telefon": "04122-9278270",
          "fax": "04122-9278271",
          "email": "uetersen@pluspunkt-apotheke.de",
          "startdatum": "14.12.2023",
          "startzeit": "08:00",
          "enddatum": "15.12.2023",
          "endzeit": "08:00"
        },
        {
          "name": "Herz-Apotheke",
          "kammer": "aksh",
          "id": "10693",
          "apo_id": "aksh10693",
          "strasse": "Industriestr. 1b",
          "plz": "22869",
          "ort": "Schenefeld",
          "distanz": "14.32437727055",
          "longitude": "9.8375714",
          "latitude": "53.6015244",
          "telefon": "040-8305384",
          "fax": "040-8391870",
          "email": "info@herz-apotheke-schenefeld.de",
          "startdatum": "14.12.2023",
          "startzeit": "08:00",
          "enddatum": "15.12.2023",
          "endzeit": "08:00"
        },
        {
          "name": "Geestland-Apotheke",
          "kammer": "aknds",
          "id": "1257",
          "apo_id": "aknds1257",
          "strasse": "Bahnhofstr. 10",
          "plz": "21717",
          "ort": "Fredenbeck",
          "distanz": "16.5851688571",
          "longitude": "9.3986392",
          "latitude": "53.5220319",
          "telefon": "04149-8888",
          "fax": "04149-7071",
          "email": [],
          "startdatum": "14.12.2023",
          "startzeit": "08:30",
          "enddatum": "15.12.2023",
          "endzeit": "08:30"
        },
        {
          "name": "Beseler-Apotheke",
          "kammer": "akh",
          "id": "10247",
          "apo_id": "akh10247",
          "strasse": "Beselerstraße 46",
          "plz": "22607",
          "ort": "Hamburg",
          "distanz": "17.332052709790002",
          "longitude": "9.8807689",
          "latitude": "53.5648219",
          "telefon": "+49 40 8907500",
          "fax": [],
          "email": "info@beseler-apotheke.de",
          "startdatum": "14.12.2023",
          "startzeit": "08:30",
          "enddatum": "15.12.2023",
          "endzeit": "08:30"
        },
        {
          "name": "Heide-Apotheke",
          "kammer": "aknds",
          "id": "1360",
          "apo_id": "aknds1360",
          "strasse": "Bahnhofstr. 35 d",
          "plz": "21629",
          "ort": "Neu Wulmstorf",
          "distanz": "17.60315995702",
          "longitude": "9.7924072",
          "latitude": "53.4675259",
          "telefon": "040-7001520",
          "fax": "040-70015299",
          "email": [],
          "startdatum": "14.12.2023",
          "startzeit": "08:30",
          "enddatum": "15.12.2023",
          "endzeit": "08:30"
        },
        {
          "name": "apogrün Apotheke in Schnelsen",
          "kammer": "akh",
          "id": "10261",
          "apo_id": "akh10261",
          "strasse": "Wählingsallee 6",
          "plz": "22459",
          "ort": "Hamburg",
          "distanz": "20.29839391376",
          "longitude": "9.92035",
          "latitude": "53.63181",
          "telefon": "+49 40 257767-0",
          "fax": [],
          "email": "info@apogruen.com",
          "startdatum": "14.12.2023",
          "startzeit": "08:30",
          "enddatum": "15.12.2023",
          "endzeit": "08:30"
        },
        {
          "name": "Wrangel-Apotheke",
          "kammer": "akh",
          "id": "10136",
          "apo_id": "akh10136",
          "strasse": "Gärtnerstraße 32",
          "plz": "20253",
          "ort": "Hamburg",
          "distanz": "22.828645344399998",
          "longitude": "9.96684",
          "latitude": "53.58311",
          "telefon": "+49 40 4225502",
          "fax": [],
          "email": "info@wrangelapotheke.de",
          "startdatum": "14.12.2023",
          "startzeit": "08:30",
          "enddatum": "15.12.2023",
          "endzeit": "08:30"
        },
        {
          "name": "Niedersachsen-Apotheke",
          "kammer": "aknds",
          "id": "1300",
          "apo_id": "aknds1300",
          "strasse": "Hauptstr. 6",
          "plz": "27449",
          "ort": "Kutenholz",
          "distanz": "23.09107185689",
          "longitude": "9.3236538",
          "latitude": "53.4821597",
          "telefon": "04762-8060",
          "fax": "04762-2201",
          "email": [],
          "startdatum": "14.12.2023",
          "startzeit": "08:30",
          "enddatum": "15.12.2023",
          "endzeit": "08:30"
        },
        {
          "name": "Lang's Hoff Apotheke",
          "kammer": "aknds",
          "id": "1287",
          "apo_id": "aknds1287",
          "strasse": "Hauptstr. 4",
          "plz": "21279",
          "ort": "Hollenstedt",
          "distanz": "25.456538442230002",
          "longitude": "9.7142202",
          "latitude": "53.366874",
          "telefon": "04165-80576",
          "fax": "04165-82121",
          "email": [],
          "startdatum": "14.12.2023",
          "startzeit": "09:00",
          "enddatum": "15.12.2023",
          "endzeit": "09:00"
        },
        {
          "name": "Alte Eilbeker Apotheke",
          "kammer": "akh",
          "id": "10048",
          "apo_id": "akh10048",
          "strasse": "Wandsbeker Chaussee 1",
          "plz": "22089",
          "ort": "Hamburg",
          "distanz": "27.43908254289",
          "longitude": "10.0344767",
          "latitude": "53.5645526",
          "telefon": "+49 40 2542639",
          "fax": [],
          "email": "info@alte-eilbeker-apotheke.de",
          "startdatum": "14.12.2023",
          "startzeit": "08:30",
          "enddatum": "15.12.2023",
          "endzeit": "08:30"
        },
        {
          "name": "Moorbek-Apotheke",
          "kammer": "aksh",
          "id": "10613",
          "apo_id": "aksh10613",
          "strasse": "Rathausallee 35-39",
          "plz": "22846",
          "ort": "Norderstedt",
          "distanz": "27.65440746975",
          "longitude": "9.9899815",
          "latitude": "53.7072711",
          "telefon": "040-5227552",
          "fax": "040-5261798",
          "email": "info@moorbek-apotheke.de",
          "startdatum": "14.12.2023",
          "startzeit": "08:00",
          "enddatum": "15.12.2023",
          "endzeit": "08:00"
        },
        {
          "name": "Reeseberg-Apotheke",
          "kammer": "akh",
          "id": "10429",
          "apo_id": "akh10429",
          "strasse": "Reeseberg 62",
          "plz": "21079",
          "ort": "Hamburg",
          "distanz": "29.33474541223",
          "longitude": "9.9940322",
          "latitude": "53.4461781",
          "telefon": "+49 40 7633131",
          "fax": [],
          "email": "Reeseberg-Apotheke@gmx.de",
          "startdatum": "14.12.2023",
          "startzeit": "08:30",
          "enddatum": "15.12.2023",
          "endzeit": "08:30"
        },
        {
          "name": "easy Apotheke Nenndorf",
          "kammer": "aknds",
          "id": "6855",
          "apo_id": "aknds6855",
          "strasse": "Bremer Straße 51",
          "plz": "21224",
          "ort": "Rosengarten",
          "distanz": "29.64276226236",
          "longitude": "9.8978904",
          "latitude": "53.3793788",
          "telefon": "04108-5902157",
          "fax": "04108-5902161",
          "email": [],
          "startdatum": "14.12.2023",
          "startzeit": "09:00",
          "enddatum": "15.12.2023",
          "endzeit": "09:00"
        }
      ]
    }
  }
}
viele Grüße, yersinia
----
FHEM 6.3 (SVN) on RPi 4B with RasPi OS Bullseye (perl 5.32.1) | FTUI
nanoCUL->2x868(1x ser2net)@tsculfw, 1x433@Sduino | MQTT2 | Tasmota | ESPEasy
VCCU->14xSEC-SCo, 7xCC-RT-DN, 5xLC-Bl1PBU-FM, 3xTC-IT-WM-W-EU, 1xPB-2-WM55, 1xLC-Sw1PBU-FM, 1xES-PMSw1-Pl

betateilchen

Zitat von: Sailor am 13 Dezember 2023, 21:43:57Und du bekommst bei dem Link hier Resultate angezeigt? :o

ja, ich hatte mit Deinem Link getestet.

Probier es doch mal umgekehrt mit meinem Link:

https://www.aponet.de/apotheke/notdienstsuche?tx_aponetpharmacy_search[action]=result&tx_aponetpharmacy_search[controller]=Search&&tx_aponetpharmacy_search[search][plzort]=21720&tx_aponetpharmacy_search[search][radius]=8&tx_aponetpharmacy_search[token]=pbOJsjDNv3I&type=1981
-----------------------
Formuliere die Aufgabe möglichst einfach und
setze die Lösung richtig um - dann wird es auch funktionieren.
-----------------------
Lesen gefährdet die Unwissenheit!

betateilchen

Zitat von: Sailor am 13 Dezember 2023, 21:43:57Ich kann mir nicht vorstellen, dass das am Firefox - Browser unter Ubuntu liegt.

Im Firefox unter macOS bekomme ich sowohl mit Deinem Link als auch mit meinem Link die richtigen Ergebnisse angezeigt.
-----------------------
Formuliere die Aufgabe möglichst einfach und
setze die Lösung richtig um - dann wird es auch funktionieren.
-----------------------
Lesen gefährdet die Unwissenheit!

Sailor

#57
Hallo betateilchen

Zitat von: betateilchen am 14 Dezember 2023, 17:26:59Probier es doch mal umgekehrt mit meinem Link:
https://www.aponet.de/apotheke/notdienstsuche?tx_aponetpharmacy_search[action]=result&tx_aponetpharmacy_search[controller]=Search&&tx_aponetpharmacy_search[search][plzort]=21720&tx_aponetpharmacy_search[search][radius]=8&tx_aponetpharmacy_search[token]=pbOJsjDNv3I&type=1981

Jetzt schlägst dem Fass den Boden aus!

{"alerts":[],"settings":{"interface":"emergency","singleViewUid":"261"},"args":{"action":"result","controller":"Search","search":{"plzort":"21720","radius":28},"token":"pbOJsjDNv3I"},"results":{"parameter":{"plzort":"21720","strasse":[],"radius":"28","longitude":"9.6069394","latitude":"53.554797","limit":[],"datum":[],"alternative":[{"latitude":"53.5712613","longitude":"9.6194317","plz":"21720","ort":"Grünendeich","teilort":"Lühedeich"},{"latitude":"53.5874022","longitude":"9.5813274","plz":"21720","ort":"Grünendeich","teilort":"Sandhörn"},{"latitude":"53.5441181","longitude":"9.6120393","plz":"21720","ort":"Guderhandviertel"},{"latitude":"53.5488685","longitude":"9.6040263","plz":"21720","ort":"Guderhandviertel","teilort":"Bergfried"},{"latitude":"53.5427394","longitude":"9.6178129","plz":"21720","ort":"Mittelnkirchen"},{"latitude":"53.5537626","longitude":"9.6074167","plz":"21720","ort":"Mittelnkirchen","teilort":"Hohenfelde"},{"latitude":"53.5752183","longitude":"9.6175431","plz":"21720","ort":"Steinkirchen","teilort":"Elbdeich"},{"latitude":"53.5758591","longitude":"9.6014183","plz":"21720","ort":"Steinkirchen","teilort":"Huttfleth"},{"latitude":"53.5696698","longitude":"9.6134962","plz":"21720","ort":"Grünendeich"},{"latitude":"53.5773382","longitude":"9.6104475","plz":"21720","ort":"Grünendeich","teilort":"Mojenhörn"},{"latitude":"53.5398696","longitude":"9.6054292","plz":"21720","ort":"Guderhandviertel","teilort":"Neßstraße"},{"latitude":"53.5612522","longitude":"9.6091165","plz":"21720","ort":"Steinkirchen"},{"latitude":"53.5845888","longitude":"9.5886299","plz":"21720","ort":"Steinkirchen","teilort":"Wetterndorf"}]},"statistik":{"anzahl":14},"quota":{"verwendet":"15577"},"apotheken":{"apotheke":[{"name":"Barlach-Apotheke","kammer":"aksh","id":"10472","apo_id":"aksh10472","strasse":"Bahnhofstr. 38-40","plz":"22880","ort":"Wedel","distanz":"6.97440742682","longitude":"9.7051496","latitude":"53.5773515","telefon":"04103-87556","fax":"04103-970377","email":"info@barlachapo.de","startdatum":"15.12.2023","startzeit":"08:00","enddatum":"16.12.2023","endzeit":"08:00"},{"uid":1440,"pid":4,"tstamp":0,"crdate":0,"cruser_id":0,"deleted":0,"hidden":0,"starttime":0,"endtime":0,"sys_language_uid":0,"l10n_parent":0,"l10n_state":null,"l10n_diffsource":null,"t3ver_oid":0,"t3ver_id":0,"t3ver_label":"","t3ver_wsid":0,"t3ver_state":0,"t3ver_stage":0,"t3ver_count":0,"t3ver_tstamp":0,"t3ver_move_id":0,"name":"Apotheke an der alten Schmiede","strasse":"Hetlinger Str. 1","plz":"25488","ort":"Holm","kammer":"aksh","id":10549,"longitude":9.67115,"latitude":53.62129,"telefon":"04103-87575","fax":"04103-9020640","email":"Apotheke.Holm@t-online.de","homepage":"","person_anrede":"Frau","person_vorname":"Ursula","person_nachname":"Schellin-Schulz","person_position":"Inhaber","logo":0,"images":0,"local_services":"","services":"","languages":"","further_languages":"","about_us":"","opening_hours":"","impressum_owner":"","impressum_behoerde":"","impressum_behoerde_address":"","impressum_behoerde_zipcity":"","impressum_registergericht":"","impressum_registernr":"","impressum_vat":"","impressum_kammer":"","emergency_id":10549,"webshop":"","status":0,"distanz":"8.52","uri":"\/apotheke\/apothekensuche\/apotheke\/Apotheke%20an%20der%20alten%20Schmiede-25488","apo_id":"aksh10549","startdatum":"15.12.2023","startzeit":"08:00","enddatum":"16.12.2023","endzeit":"08:00","person":{"anrede":"Frau","vorname":"Ursula","nachname":"Schellin-Schulz","position":"Inhaber"}},{"name":"Brücken Apotheke","kammer":"aknds","id":"1175","apo_id":"aknds1175","strasse":"Zwischen den Brücken 7","plz":"21614","ort":"Buxtehude","distanz":"10.69672149858","longitude":"9.6971601","latitude":"53.4751378","telefon":"04161-512661","fax":"04161-512662","email":[],"startdatum":"15.12.2023","startzeit":"08:00","enddatum":"16.12.2023","endzeit":"08:00"},{"name":"Kranz-Apotheke","kammer":"aknds","id":"1441","apo_id":"aknds1441","strasse":"Bremervörder Str. 128","plz":"21682","ort":"Stade","distanz":"11.97516904744","longitude":"9.4405476","latitude":"53.5968661","telefon":"04141-81888","fax":"04141-82865","email":[],"startdatum":"15.12.2023","startzeit":"08:30","enddatum":"16.12.2023","endzeit":"08:30"},{"name":"Auetal-Apotheke","kammer":"aknds","id":"1275","apo_id":"aknds1275","strasse":"Buxtehuder Str. 29","plz":"21698","ort":"Harsefeld","distanz":"12.32761907336","longitude":"9.5180871","latitude":"53.4575191","telefon":"04164-859494","fax":"04164-859495","email":[],"startdatum":"15.12.2023","startzeit":"08:00","enddatum":"16.12.2023","endzeit":"08:00"},{"name":"Linden-Apotheke","kammer":"aksh","id":"10590","apo_id":"aksh10590","strasse":"Lindenweg 2","plz":"25436","ort":"Tornesch","distanz":"17.47754120351","longitude":"9.7178271","latitude":"53.6973256","telefon":"04122-5767","fax":"04122-52213","email":"Linden-Apotheke-Tornesch@t-online.de","startdatum":"15.12.2023","startzeit":"08:00","enddatum":"16.12.2023","endzeit":"08:00"},{"name":"Apotheke am Teich","kammer":"akh","id":"10190","apo_id":"akh10190","strasse":"Liebermannstraße 54","plz":"22605","ort":"Hamburg","distanz":"19.28744170347","longitude":"9.8978769","latitude":"53.5508067","telefon":"+49 40 8803255","fax":[],"email":"apotheke-am-teich@t-online.de","startdatum":"15.12.2023","startzeit":"08:30","enddatum":"16.12.2023","endzeit":"08:30"},{"name":"Aesculap-Apotheke","kammer":"aksh","id":"10823","apo_id":"aksh10823","strasse":"Hermann-Ehlers-Weg 4","plz":"25337","ort":"Elmshorn","distanz":"21.98467466847","longitude":"9.67685","latitude":"53.74791","telefon":"04121-475920","fax":"04121-4759215","email":"abromeit@aescuvit.de","startdatum":"15.12.2023","startzeit":"08:00","enddatum":"16.12.2023","endzeit":"08:00"},{"name":"Central-Apotheke","kammer":"akh","id":"10137","apo_id":"akh10137","strasse":"Rödingsmarkt 1","plz":"20459","ort":"Hamburg","distanz":"25.236333817899997","longitude":"9.9875525","latitude":"53.5484379","telefon":"+49 40 378673-0","fax":[],"email":"mail@central-apotheke-hamburg.de","startdatum":"15.12.2023","startzeit":"08:30","enddatum":"16.12.2023","endzeit":"08:30"},{"name":"Vering-Apotheke","kammer":"akh","id":"10255","apo_id":"akh10255","strasse":"Veringstr. 37","plz":"21107","ort":"Hamburg","distanz":"25.585227276879998","longitude":"9.98694","latitude":"53.51484","telefon":"+49 40 757663","fax":[],"email":"info@vering-apotheke.de","startdatum":"15.12.2023","startzeit":"08:30","enddatum":"16.12.2023","endzeit":"08:30"},{"name":"Feld-Apotheke Langenbek","kammer":"akh","id":"10498","apo_id":"akh10498","strasse":"Gordonstr. 2","plz":"21079","ort":"Hamburg","distanz":"28.637593539559997","longitude":"9.9867926","latitude":"53.4327351","telefon":"+49 40 7638008","fax":[],"email":"Feld-Apotheke@t-online.de","startdatum":"15.12.2023","startzeit":"08:30","enddatum":"16.12.2023","endzeit":"08:30"},{"name":"Coppernicus-Apotheke","kammer":"aksh","id":"10357","apo_id":"aksh10357","strasse":"Berliner Allee 34a","plz":"22850","ort":"Norderstedt","distanz":"28.86744558915","longitude":"9.9850706","latitude":"53.6841422","telefon":"040-5236569","fax":"040-52385226","email":"apotheke@coppernicus-apotheke.de","startdatum":"15.12.2023","startzeit":"08:00","enddatum":"16.12.2023","endzeit":"08:00"},{"name":"Nord-Apotheke","kammer":"akh","id":"10104","apo_id":"akh10104","strasse":"Fuhlsbüttler Str. 265","plz":"22307","ort":"Hamburg","distanz":"29.23155666527","longitude":"10.0423616","latitude":"53.5975135","telefon":"+49 40 616154","fax":[],"email":"nord-apotheke.hamburg@t-online.de","startdatum":"15.12.2023","startzeit":"08:30","enddatum":"16.12.2023","endzeit":"08:30"},{"name":"Kosmos-Apotheke","kammer":"akh","id":"10263","apo_id":"akh10263","strasse":"Wandsbeker Chaussee 261","plz":"22089","ort":"Hamburg","distanz":"29.69976507849","longitude":"10.0545","latitude":"53.56923","telefon":"+49 40 208202","fax":[],"email":"tyler-thiede@t-online.de","startdatum":"15.12.2023","startzeit":"08:30","enddatum":"16.12.2023","endzeit":"08:30"}]}}}
Der einzige Unterschied ist, dass du einen anderen Token hast und nach PLZ suchst...

Dann eben mit PLZ...

Frage: Dein Token kommt auch aus der Datei https://www.aponet.de/typo3temp/assets/compressed/pharmacymap-3632d5053cd86d3c76729f1088c9bc80.js
?

Und wie hast du die Suche auf Niedersachsen begrenzt?

Gruß
    Sailor
******************************
Man wird immer besser...

betateilchen

Zitat von: Sailor am 15 Dezember 2023, 11:35:51Frage: Dein Token kommt auch aus der Datei

Und wie hast du die Suche auf Niedersachsen begrenzt?

Das Token beziehe ich genau wie hier im Thread beschrieben. Es war in meinem Link das gestern gültige Token.

Die Begrenzung der Suche auf Niedersachsen habe ich auch schon hier im Thread beschrieben.
Das passiert in der Generierung der readings im JsonMod device über die im Ergebnis zu jeder Apotheke zurückgelieferten Apothekerkammer, zu der eine Apotheke gehört.

attr apotheke readingList multi(jsonPath("\$.results.apotheken.apotheke.[?(\@.kammer in ['aknds'])]"), property('ort'), concat(property('name'),', ',property('strasse'),', ',property('telefon'),', ',sprintf("%.0f km",property('distanz'))));;
-----------------------
Formuliere die Aufgabe möglichst einfach und
setze die Lösung richtig um - dann wird es auch funktionieren.
-----------------------
Lesen gefährdet die Unwissenheit!

Sailor

Hallo betateilchen

Zitat von: betateilchen am 15 Dezember 2023, 11:42:35Das Token beziehe ich genau wie hier im Thread beschrieben. Es war in meinem Link das gestern gültige Token.

Jetzt wird es richtig lustig - Ich habe deinen Token in meinen alten Link eingefügt:
https://www.aponet.de/apotheke/notdienstsuche?tx_aponetpharmacy_search[action]=result&tx_aponetpharmacy_search[controller]=Search&&tx_aponetpharmacy_search[search][lat]=53.5889281&tx_aponetpharmacy_search[search][lng]=9.6222632&tx_aponetpharmacy_search[search][radius]=8&tx_aponetpharmacy_search[token]=pbOJsjDNv3I&type=1981

und siehe da, es funktioniert:
{"alerts":[],"settings":{"interface":"emergency","singleViewUid":"261"},"args":{"action":"result","controller":"Search","search":{"lat":"53.5889281","lng":"9.6222632","radius":28},"token":"pbOJsjDNv3I"},"results":{"parameter":{"plzort":[],"strasse":[],"radius":"28","longitude":"9.6222632","latitude":"53.5889281","limit":[],"datum":[]},"statistik":{"anzahl":14},"quota":{"verwendet":"16019"},"apotheken":{"apotheke":[{"uid":1440,"pid":4,"tstamp":0,"crdate":0,"cruser_id":0,"deleted":0,"hidden":0,"starttime":0,"endtime":0,"sys_language_uid":0,"l10n_parent":0,"l10n_state":null,"l10n_diffsource":null,"t3ver_oid":0,"t3ver_id":0,"t3ver_label":"","t3ver_wsid":0,"t3ver_state":0,"t3ver_stage":0,"t3ver_count":0,"t3ver_tstamp":0,"t3ver_move_id":0,"name":"Apotheke an der alten Schmiede","strasse":"Hetlinger Str. 1","plz":"25488","ort":"Holm","kammer":"aksh","id":10549,"longitude":9.67115,"latitude":53.62129,"telefon":"04103-87575","fax":"04103-9020640","email":"Apotheke.Holm@t-online.de","homepage":"","person_anrede":"Frau","person_vorname":"Ursula","person_nachname":"Schellin-Schulz","person_position":"Inhaber","logo":0,"images":0,"local_services":"","services":"","languages":"","further_languages":"","about_us":"","opening_hours":"","impressum_owner":"","impressum_behoerde":"","impressum_behoerde_address":"","impressum_behoerde_zipcity":"","impressum_registergericht":"","impressum_registernr":"","impressum_vat":"","impressum_kammer":"","emergency_id":10549,"webshop":"","status":0,"distanz":"4.83","uri":"\/apotheke\/apothekensuche\/apotheke\/Apotheke%20an%20der%20alten%20Schmiede-25488","apo_id":"aksh10549","startdatum":"15.12.2023","startzeit":"08:00","enddatum":"16.12.2023","endzeit":"08:00","person":{"anrede":"Frau","vorname":"Ursula","nachname":"Schellin-Schulz","position":"Inhaber"}},{"name":"Barlach-Apotheke","kammer":"aksh","id":"10472","apo_id":"aksh10472","strasse":"Bahnhofstr. 38-40","plz":"22880","ort":"Wedel","distanz":"5.63867520954","longitude":"9.7051496","latitude":"53.5773515","telefon":"04103-87556","fax":"04103-970377","email":"info@barlachapo.de","startdatum":"15.12.2023","startzeit":"08:00","enddatum":"16.12.2023","endzeit":"08:00"},{"name":"Kranz-Apotheke","kammer":"aknds","id":"1441","apo_id":"aknds1441","strasse":"Bremervörder Str. 128","plz":"21682","ort":"Stade","distanz":"12.06448886617","longitude":"9.4405476","latitude":"53.5968661","telefon":"04141-81888","fax":"04141-82865","email":[],"startdatum":"15.12.2023","startzeit":"08:30","enddatum":"16.12.2023","endzeit":"08:30"},{"name":"Brücken Apotheke","kammer":"aknds","id":"1175","apo_id":"aknds1175","strasse":"Zwischen den Brücken 7","plz":"21614","ort":"Buxtehude","distanz":"13.603396370439999","longitude":"9.6971601","latitude":"53.4751378","telefon":"04161-512661","fax":"04161-512662","email":[],"startdatum":"15.12.2023","startzeit":"08:00","enddatum":"16.12.2023","endzeit":"08:00"},{"name":"Linden-Apotheke","kammer":"aksh","id":"10590","apo_id":"aksh10590","strasse":"Lindenweg 2","plz":"25436","ort":"Tornesch","distanz":"13.61967264706","longitude":"9.7178271","latitude":"53.6973256","telefon":"04122-5767","fax":"04122-52213","email":"Linden-Apotheke-Tornesch@t-online.de","startdatum":"15.12.2023","startzeit":"08:00","enddatum":"16.12.2023","endzeit":"08:00"},{"name":"Auetal-Apotheke","kammer":"aknds","id":"1275","apo_id":"aknds1275","strasse":"Buxtehuder Str. 29","plz":"21698","ort":"Harsefeld","distanz":"16.17520420457","longitude":"9.5180871","latitude":"53.4575191","telefon":"04164-859494","fax":"04164-859495","email":[],"startdatum":"15.12.2023","startzeit":"08:00","enddatum":"16.12.2023","endzeit":"08:00"},{"name":"Aesculap-Apotheke","kammer":"aksh","id":"10823","apo_id":"aksh10823","strasse":"Hermann-Ehlers-Weg 4","plz":"25337","ort":"Elmshorn","distanz":"18.05858563984","longitude":"9.67685","latitude":"53.74791","telefon":"04121-475920","fax":"04121-4759215","email":"abromeit@aescuvit.de","startdatum":"15.12.2023","startzeit":"08:00","enddatum":"16.12.2023","endzeit":"08:00"},{"name":"Apotheke am Teich","kammer":"akh","id":"10190","apo_id":"akh10190","strasse":"Liebermannstraße 54","plz":"22605","ort":"Hamburg","distanz":"18.7458225637","longitude":"9.8978769","latitude":"53.5508067","telefon":"+49 40 8803255","fax":[],"email":"apotheke-am-teich@t-online.de","startdatum":"15.12.2023","startzeit":"08:30","enddatum":"16.12.2023","endzeit":"08:30"},{"name":"Central-Apotheke","kammer":"akh","id":"10137","apo_id":"akh10137","strasse":"Rödingsmarkt 1","plz":"20459","ort":"Hamburg","distanz":"24.61702173774","longitude":"9.9875525","latitude":"53.5484379","telefon":"+49 40 378673-0","fax":[],"email":"mail@central-apotheke-hamburg.de","startdatum":"15.12.2023","startzeit":"08:30","enddatum":"16.12.2023","endzeit":"08:30"},{"name":"Vering-Apotheke","kammer":"akh","id":"10255","apo_id":"akh10255","strasse":"Veringstr. 37","plz":"21107","ort":"Hamburg","distanz":"25.53785703732","longitude":"9.98694","latitude":"53.51484","telefon":"+49 40 757663","fax":[],"email":"info@vering-apotheke.de","startdatum":"15.12.2023","startzeit":"08:30","enddatum":"16.12.2023","endzeit":"08:30"},{"name":"Coppernicus-Apotheke","kammer":"aksh","id":"10357","apo_id":"aksh10357","strasse":"Berliner Allee 34a","plz":"22850","ort":"Norderstedt","distanz":"26.233724250570003","longitude":"9.9850706","latitude":"53.6841422","telefon":"040-5236569","fax":"040-52385226","email":"apotheke@coppernicus-apotheke.de","startdatum":"15.12.2023","startzeit":"08:00","enddatum":"16.12.2023","endzeit":"08:00"},{"name":"Nord-Apotheke","kammer":"akh","id":"10104","apo_id":"akh10104","strasse":"Fuhlsbüttler Str. 265","plz":"22307","ort":"Hamburg","distanz":"27.832511555190003","longitude":"10.0423616","latitude":"53.5975135","telefon":"+49 40 616154","fax":[],"email":"nord-apotheke.hamburg@t-online.de","startdatum":"15.12.2023","startzeit":"08:30","enddatum":"16.12.2023","endzeit":"08:30"},{"name":"Kosmos-Apotheke","kammer":"akh","id":"10263","apo_id":"akh10263","strasse":"Wandsbeker Chaussee 261","plz":"22089","ort":"Hamburg","distanz":"28.713198495190003","longitude":"10.0545","latitude":"53.56923","telefon":"+49 40 208202","fax":[],"email":"tyler-thiede@t-online.de","startdatum":"15.12.2023","startzeit":"08:30","enddatum":"16.12.2023","endzeit":"08:30"},{"name":"Feld-Apotheke Langenbek","kammer":"akh","id":"10498","apo_id":"akh10498","strasse":"Gordonstr. 2","plz":"21079","ort":"Hamburg","distanz":"29.78315889318","longitude":"9.9867926","latitude":"53.4327351","telefon":"+49 40 7638008","fax":[],"email":"Feld-Apotheke@t-online.de","startdatum":"15.12.2023","startzeit":"08:30","enddatum":"16.12.2023","endzeit":"08:30"}]}}}
Aber der Link
https://www.aponet.de/typo3temp/assets/compressed/pharmacymap-3632d5053cd86d3c76729f1088c9bc80.js

gibt mir immer noch

$(function() {


  $(document).on('submit', '.slideout-pharmacy-searchform', function(e){
    e.preventDefault();
    var action = $(this).attr('action');
    var path = action.split('?')[0];
    var plzort = encodeURIComponent($(this).find('input[name="tx_aponetpharmacy_search[search][plzort]"]').val());
    // console.log(plzort);
    window.location.href = path + '/' + plzort;
  });

  var plzort = $('#pharmacy-searchform input[name="tx_aponetpharmacy_search[search][plzort]"]').val();
  var lat = 51.133481;
  var lng = 10.018343;
  var radiusMarker = L.marker();
  var date;
  var street;
  var radius;
  var today = new Date();
  var dd = String(today.getDate()).padStart(2, '0');
  var mm = String(today.getMonth() + 1).padStart(2, '0'); //January is 0!
  var yyyy = today.getFullYear();
  today = dd + '.' + mm + '.' + yyyy;
  var flagIcon = L.icon({
    iconUrl: '/typo3conf/ext/aponet_pharmacy/Resources/Public/Icons/flag.svg',
    iconSize:     [32, 41], // size of the icon
    iconAnchor:   [0, 41], // point of the icon which will correspond to marker's location
  });
  var accessToken = 'pk.01ad37e2874447012778b6104b024ae0';
  var tiles = L.tileLayer('https://{s}-tiles.locationiq.com/v2/streets/r/{z}/{x}/{y}.png?key=' + accessToken, {
    attribution: '© <a href="https://locationiq.com" target="_blank">LocationIQ Maps</a>, <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> Contributors',
    minZoom: 6,
    maxZoom: 19,
    id: 'streets',
  });
  var latlng = L.latLng(lat, lng);
  var map = L.map('pharmacy-map', {center: latlng, zoom: 6, layers: [tiles]});


  //loadMarker(window.location.pathname, plzort);

  var markers = L.markerClusterGroup({
    spiderfyShapePositions: function(count, centerPt) {
      var distanceFromCenter = 35,
          markerDistance = 45,
          lineLength = markerDistance * (count - 1),
          lineStart = centerPt.y - lineLength / 2,
          res = [],
          i;

      res.length = count;

      for (i = count - 1; i >= 0; i--) {
          res[i] = new Point(centerPt.x + distanceFromCenter, lineStart + markerDistance * i);
      }

      return res;
   }
  });

// Random String, generated by Typo3 Task. Do not change anything between these Comments
/*** start random tokens ***/
var randomToken = 'dFvsmbi/G4A';
/*** end random tokens ***/

  if ($('#pharmacy-map').length > 0) {

    // Ajax request

    function loadResults(url, plzort, date, street, radius, lat, lng) {
      $.ajax({
        type: "GET",
        url: url,
        data: {
          tx_aponetpharmacy_search: {
            action : 'result',
            controller : 'Search',
            search: {
              plzort: plzort,
              date: date,
              street: street,
              radius: radius,
              lat: lat,
              lng: lng,
            },
            token: randomToken
          },
          type: '1981',
        },
        success: function(res) {
          //features = (res.features);
          var results = (res.results);
          var args = (res.args);
          var settings = (res.settings);
          var alerts = (res.alerts);
          createList(results, settings);
          createAlternatives(results);
          createAlerts(alerts);
          if (results.apotheken.hasOwnProperty('apotheke')) {
            $('input[name="tx_aponetpharmacy_search[search][radius]"]').val(args['search']['radius']);
            $('#serach-filters .radius-val').html(args['search']['radius']);
            var features = makeGeojson(results.apotheken.apotheke);
            setMarkers(features);
          }
          else {
            markers.clearLayers();
          }
          if (results.parameter.latitude.length && results.parameter.longitude.length) {
            lat = results.parameter.latitude;
            lng = results.parameter.longitude;
            radiusMarker = L.marker([lat, lng], {icon: flagIcon}).addTo(map);
          }
        }
      });
    }

    function makeGeojson (results) {
      var features = {
        type: "FeatureCollection",
        features: [],
      };

      Object.values(results).forEach(item => {
        var popupContent = '<h5>' + item.name + '</h5>';
        popupContent += '<p>';
        if (item.strasse) {
          popupContent += item.strasse;
        }
        if (item.plz) {
          popupContent += '<br>' + item.plz;
        }
        if (item.ort) {
          popupContent += ' ' + item.ort;
        }
        popupContent += '</p><p>';
        if (item.telefon && item.telefon.length) {
          popupContent += '<span>Tel: </span><a href="tel:' + item.telefon + '">' + item.telefon + '</a>';
        }
        if (item.fax && item.fax.length) {
          popupContent += '<br><span>Fax: </span>' + item.fax;
        }
        if (item.email && item.email.length) {
          popupContent += '<br><a href="mailto:' + item.email + '">' + item.email + '</a>';
        }
        if (item.homepage && item.homepage.length) {
          if (!item.homepage.startsWith("http")){
            item.homepage = 'http://' + item.homepage;
          }
          popupContent += '<br><a target="_blank" href="' + item.homepage + '" title="' + item.name + '">' + item.homepage + '</a>';
        }
        popupContent += '</p>';

        var feature = {
          "type" : "Feature",
          "properties" : {
            "id" : item.id,
            "name" : item.name,
            "popupContent" : popupContent
          },
          "geometry": {
            "type": "Point",
            "coordinates": [parseFloat(item.longitude),parseFloat(item.latitude)]
          }
        };
        features.features.push(feature);
      });

      return features;
    }

    function createList(results, settings){

      if (results.apotheken.hasOwnProperty('apotheke')) {
        var list = $('<ul class="list list-group mb-4 shadow-sm"></ul>');
        var foundMessage = '<p class="pt-3 mb-3">' + results.apotheken.apotheke.length + ' Apotheken im Umkreis von ' + results.parameter.radius + ' Kilometern gefunden.</p>';

        Object.values(results.apotheken.apotheke).forEach(item => {
          var listItem = createListItem(item, settings.interface);
          list.append(listItem);
        });
        $('#pharmacy-search-result').empty().append(foundMessage).append(list);
        $('#pharmacy-search-result').append($('<ul class="pagination"></ul>'));


        new List('pharmacy-search-result', {
          valueNames: ['name'],
          page: 10,
          pagination: [{
            paginationClass: "pagination",
            innerWindow: 2,
            outerWindow: 1,
          }]
        });
      }
      else {
        $('#pharmacy-search-result').empty();
      }
    }




    function setMarkers(features) {

      markers.clearLayers();

      var geojson = L.geoJson(features, {
        style: function (feature) {
          return {color: feature.properties.color};
        },
        pointToLayer: function(feature, latlng) {
          var smallIcon = new L.Icon({
              iconSize: [32, 32],
              iconAnchor: [16, 32],
              popupAnchor:  [0, -32],
              iconUrl: '/typo3conf/ext/aponet_pharmacy/Resources/Public/Icons/Deutsche_Apotheke_Logo.svg'
          });
          return L.marker(latlng, {icon: smallIcon});
        },
        onEachFeature: function (feature, layer) {
          var popupText = feature.properties.popupContent;
          layer.bindPopup(decodeEntities(popupText));
        }
      });

      markers.addLayer(geojson);

      map.addLayer(markers);
      map.flyToBounds(geojson.getBounds())
      //map.flyTo(L.latLng(lat, lng), 13);
    }

    var radiusVal = $('#serach-filters .radius').val();
    $('#serach-filters .radius-val').html(radiusVal);
    $('#serach-filters .radius').on('change', function() {
      radiusVal = $(this).val();
      $('#serach-filters .radius-val').html(radiusVal);
      $(this).parents('form').submit();
    });

    function loadContent() {
      var action = $('form#pharmacy-searchform').attr('action');
      var path = action.split('?')[0];
      plzort = $('input[name="tx_aponetpharmacy_search[search][plzort]"]').val();
      date = $('input[name="tx_aponetpharmacy_search[search][date]"]').val();
      street = $('input[name="tx_aponetpharmacy_search[search][street]"]').val();
      radius = $('input[name="tx_aponetpharmacy_search[search][radius]"]').val();
      if (street) {
        var streetAspect = street;
      }
      else {
        var streetAspect = ' ';
      }

      if (plzort) {
        var plzortAspect = plzort;
      }
      else {
        var plzortAspect = ' ';
      }
      const state = { 'plzort': plzortAspect, 'street': streetAspect, 'radius': radius }
      window.history.pushState(state, 'Title', path + '/' + encodeURIComponent(plzortAspect) + '/' + encodeURIComponent(streetAspect) + '/' + encodeURIComponent(radius));
      map.removeLayer(radiusMarker);
      if (plzort != '') {
        loadResults(path, plzort, date, street, radius, "", "");
      }
      else {
        loadResults(path, plzort, date, street, radius, lat, lng);
      }
    }

    L.Control.GeoButton = L.Control.extend({
      onAdd: function(map) {
          var button = L.DomUtil.create('button', 'btn btn-primary');
          button.innerHTML = 'Zeige aktuellen Standort';
          L.DomEvent.addListener(button, 'click', L.DomEvent.stopPropagation);
          L.DomEvent.addListener(button, 'click', L.DomEvent.preventDefault);
          L.DomEvent.addListener(button, 'click', initGeoLocation);
          return button;
      },

      onRemove: function(map) {
          // Nothing to do here
      }
    });

    L.control.geoButton = function(opts) {
        return new L.Control.GeoButton(opts);
    }

    L.control.geoButton({ position: 'topright' }).addTo(map);

    if (plzort.trim() != '') {
      loadContent();
    }

    $(document).on('submit','#pharmacy-searchform',function(event){
      event.preventDefault();
      loadContent();
    });

    $(document).on('change','#select-alternative',function(event){
      event.preventDefault();
      var alternative = $(this).val();
      $('input[name="tx_aponetpharmacy_search[search][plzort]"]').val(alternative);
      $('#pharmacy-searchform').submit();
    });

    // decode html text into html entity
    function decodeEntities(encodedString) {
      var translate_re = /&(nbsp|amp|quot|lt|gt);/g;
      var translate = {
          "nbsp":" ",
          "amp" : "&",
          "quot": "\"",
          "lt"  : "<",
          "gt"  : ">"
      };
      return encodedString.replace(translate_re, function(match, entity) {
          return translate[entity];
      }).replace(/&#(\d+);/gi, function(match, numStr) {
          var num = parseInt(numStr, 10);
          return String.fromCharCode(num);
      });
    }

    function displayLocation(position) {
        var action = $('form#pharmacy-searchform').attr('action');
        var path = action.split('?')[0];
        var cords = position.coords;
        lat = cords.latitude;
        lng = cords.longitude;
        date = $('input[name="tx_aponetpharmacy_search[search][date]"]').val();
        radius = $('input[name="tx_aponetpharmacy_search[search][radius]"]').val();
        $('input[name="tx_aponetpharmacy_search[search][plzort]"]').val('');
        $('input[name="tx_aponetpharmacy_search[search][street]"]').val('');
        plzort = '';
        street = '';
        map.removeLayer(radiusMarker);
        loadResults(path, plzort, date, street, radius, lat, lng);
        //loadList(path, plzort, date, street, radius, lat, lng);
    }
    function errorLocation(err) {
      console.warn('ERROR ' + err.code + ': ' + err.message);
    }


    function initGeoLocation() {
      //console.log(!(navigator.geolocation == 'undefined'));
        if (!(navigator.geolocation == 'undefined')) {
          var options = {
            enableHighAccuracy: true,
            timeout: 5000,
            maximumAge: 0
          };
          navigator.geolocation.getCurrentPosition(displayLocation, errorLocation, options);
        }
    }


    window.onpopstate = function(e){
      if(e.state){
          document.getElementById("content").innerHTML = e.state.html;
          document.title = e.state.pageTitle;
      }
    }

    function createListItem(item, interface) {

      var listItem = '<li class="list-group-item' + (item.uid ? ' premium' : '') + '">' +
        '<div class="d-flex justify-content-between align-items-center">' +
          '<h4 class="name">' + item.name + '</h4>' +
          '<div class="distanz badge badge-light"><span class="d-none d-sm-inline">Entfernung: </span>' + parseFloat(item.distanz).toFixed(2) + ' km</div>' +
        '</div>';

      if (item.local_services !== undefined) {
        var localServices = item.local_services.split(",");
        if (localServices[localServices.length - 1] == "") {
          delete localServices[localServices.length - 1];
        }

        listItem += '<div><ul class="local-services-list list-unstyled">';
        localServices.forEach(function (service, index) {
          listItem += '<li class="' + service + ' my-1 mr-1">' +
            (service == 'lieferservice' ? 'Lieferservice' : '') +
            (service == 'barrierefreiheit' ? 'Barrierefreiheit' : '') +
            (service == 'parkmoeglichkeit' ? 'Parkmöglichkeit vor Ort' : '') +
          '</li>';
        });

        listItem += '</ul></div>';
      }
      if (interface == "emergency") {
                listItem += '<div class="mb-2">' +
                    '<p>' +
                        'Notdienst vom ' + item.startdatum + ' um ' + item.startzeit + ' Uhr bis ' + item.enddatum + ' um ' + item.endzeit + ' Uhr.' +
                    '</p>' +
                '</div>';
      }

      if (item.homepage && item.homepage.length) {
        if (!item.homepage.startsWith("http")){
          item.homepage = 'http://' + item.homepage;
        }
      }

      listItem += '<div class="row">' +
        '<div class="col-md-4">' +
          '<p>' +
            '<span class="strasse">' + item.strasse + '</span><br>' +
            '<span class="plz">' + item.plz + '</span> <span class="ort">' + item.ort + '</span><br>' +
          '</p>' +
        '</div>' +
        '<div class="col-md-4">' +
          '<p>' +
            (item.telefon && item.telefon.length ? '<span>Tel: </span><a href="tel:' + item.telefon + '">' + item.telefon + '</a>' : '') +
            (item.fax && item.fax.length ? '<br><span>Fax: </span><a href="fax:' + item.fax + '">' + item.fax + '</a>' : '') +
            (item.email && item.email.length ? '<br><a href="mailto:' + item.email + '">' + item.email + '</a>' : '') +
            (item.homepage && item.homepage.length ? '<br><a href="' + item.homepage + '" target="_blank" title="' + item.name + '">' + item.homepage + '</a>' : '') +
          '</p>' +
        '</div>' +
        '<div class="col-md-4 d-flex flex-column align-items-end justify-content-end">' +
          (item.uri ? '<a href="' + item.uri + '" class="showapo">mehr erfahren</a>' : '') +
          '<a class="showapo" target="_blank" href="http://maps.google.de/maps?q=' + item.strasse + ',+' + item.plz + '+' + item.ort + '+,+Germany&z=17&basemap=roadmap">Google Navigation</a>' +
          '<a class="btn btn-secondary-small-invert btn-busbahn" target="_blank" href="https://www.awin1.com/cread.php?awinmid=14964&awinaffid=640337&linkid=3441876&p=https%3A%2F%2Fwww.bahn.de%2Fbuchung%2Fstart%3FSTS%3Dfalse%26SO%3D%26ZO%3D' + item.plz + '+' + item.ort + '+' + item.strasse + ')%26dbkanal_003%3DL01_S01_D001_KAF0001_14964_AFFILIATE-CPC_KOOP-APONET-2023-!!!affid!!!_LZ03">Mit Bus / Bahn erreichen</a>' +
        '</div>' +
      '</div>';

      listItem += '</li>';
      return listItem;
    }

    function createAlternatives(results) {
      if (results.parameter.hasOwnProperty('alternative') && results.parameter.alternative.length > 1) {
        var alternatives = results.parameter.alternative;

        var selectField = '<label for="alternatives">Suche verfeinern:</label>' +
        '<select class="form-control custom-select" id="select-alternative">';

        alternatives.forEach(alternative => {
          if (alternative == results.parameter.current) {
            selectField += '<option value="' + alternative.plz + ' ' + alternative.ort + (alternative.teilort != undefined ? ' ' + alternative.teilort : '') + '" selected="true">' + alternative.plz + ' ' + alternative.ort + (alternative.teilort != undefined ? ' ' + alternative.teilort : '') + '</option>';
          }
          else {
            selectField += '<option value="' + alternative.plz + ' ' + alternative.ort + (alternative.teilort != undefined ? ' ' + alternative.teilort : '') + '">' + alternative.plz + ' ' + alternative.ort + (alternative.teilort != undefined ? ' ' + alternative.teilort : '') + '</option>';
          }
        });

        selectField += '</select>';

         $('#alternatives').empty().append(selectField);
      }
      else {
        $('#alternatives').empty();
      }
    }


    function createAlerts(alerts) {
      var alertMessages = '';
      if (alerts.length) {
        alerts.forEach(item => {
          var alert = '<div class="alert alert-info mt-3" role="alert">' +
            '<h5 class="mt-0">' + item.title + '</h5>' +
            '<p class="mb-0">' + item.message + '</hp>' +
          '</div>';
          alertMessages += alert;
        });
        $('#pharmacy-alerts').empty().append($(alertMessages));
      }
      else {
        $('#pharmacy-alerts').empty();
      }
    }


  }

});

und somit

// Random String, generated by Typo3 Task. Do not change anything between these Comments
/*** start random tokens ***/
var randomToken = 'dFvsmbi/G4A';
/*** end random tokens ***/
raus.
Mit diesem funktioniert es nicht.

Ich habe sogar versucht den Browser Cache zu loeschen, aber mit dem gleichen Ergebnis.

Somit kann ich den Fehler auf den fehlerhaften Token zurückführen.

Fragen über Fragen...

Gruss
    Sailor
******************************
Man wird immer besser...