Last active
May 14, 2024 08:48
-
-
Save ppdms/8b4b8df707273d462fdd933adca42b1c to your computer and use it in GitHub Desktop.
Notify Discord with webhook if there's tickets for a GNO performance
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
| #!/bin/bash | |
| ###################################################################### | |
| # @author : Vasileios Papadimas (papadimas@protonmail.com) | |
| # @file : tickets.sh | |
| # @created : Sunday Mar 24, 2024 20:23:31 EET | |
| ###################################################################### | |
| output=$(curl -s 'https://www.ticketservices.gr/event/gno-die-walkuere/?lang=el' | iconv -f "windows-1253" -t UTF-8) | |
| echo "$output" | |
| if ! echo "$output" | grep -q "2024-03-31"; then | |
| curl -s -i -H "Accept: application/json" -H "Content-Type:application/json" -X POST --data "{\"content\": \"Something wrong!\"}" WEBHOOK | |
| fi | |
| if ! echo "$output" | grep -q 'SOLD OUT<br>'; then | |
| curl -s -i -H "Accept: application/json" -H "Content-Type:application/json" -X POST --data "{\"content\": \"Tickets!\"}" WEBHOOK | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment