Skip to content

Instantly share code, notes, and snippets.

@ppdms
Last active May 14, 2024 08:48
Show Gist options
  • Select an option

  • Save ppdms/8b4b8df707273d462fdd933adca42b1c to your computer and use it in GitHub Desktop.

Select an option

Save ppdms/8b4b8df707273d462fdd933adca42b1c to your computer and use it in GitHub Desktop.
Notify Discord with webhook if there's tickets for a GNO performance
#!/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