Last active
July 12, 2025 05:08
-
-
Save dewomser/fcf6e24737e6e6a0df1a5982b7c19de7 to your computer and use it in GitHub Desktop.
Das Script lässt sich auf andere Bahnhöfe anpassen. Stadtnamen ändern. und die Nummer hinter Hbf Die Nummer steht im Quelltext der Webseite inputRef
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Funktioniert nicht mehr /Neue URL https://www.bahnhof.de/worms-hbf | |
| #!/bin/bash | |
| worms="https://reiseauskunft.bahn.de/bin/bhftafel.exe/dn?ld=4011&protocol=https:&rt=1&evaId=8000257&boardType=dep&productsFilter=11111&rtMode=&start=yes" | |
| Ansage=$(curl -s -X GET $worms | html2text | grep Grund -C1) | |
| curl -s -X GET $worms|grep '<class=\"red bold\">' -m1 | |
| if [ -z "${Ansage}" ]; then | |
| echo "Es gibt keine Störung im Bahnhof" | |
| espeak -vde "Esgibtkeine Störung im bahnhof" | |
| fi | |
| echo $Ansage | espeak -vde | |
| echo $Ansage | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Funktioniert nicht mehr /Neue URL https://www.bahnhof.de/worms-hbf | |
| clear; echo -e "\nVerspätungen im Bahnhof Worms\n" ; worms="https://reiseauskunft.bahn.de/bin/bhftafel.exe/dn?ld=4011&protocol=https:&rt=1&evaId=8000257&boardType=dep&productsFilter=11111&rtMode=&start=yes";curl -s -X GET $worms|grep -E "*" 2>&1 | html2text --ignore-links --ignore-images | grep -E -B 4 "Grund" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment