Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
New Zealand activities watchers

Watchers for NZ activities

  • DoC huts can be cancelled at no cost until quite late. It is common for fully booked huts to become available. A GUI flow is made available using TagUI.
  • BookMe.co.nz gives deals on some activities. Deals may appear closer to the activity date.
# BookMe.co.nz watch for some deal
ACTIVITY_ID=429
while ! curl -s "https://www.bookme.co.nz/things-to-do/ajax/changeDate?date=21%21March%202018&activityId=$ACTIVITY_ID&_=1520111680085" | grep deal
do
sleep 60
date
done
curl -s "https://www.bookme.co.nz/things-to-do/ajax/changeDate?date=21%21March%202018&activityId=$ACTIVITY_ID&_=1520111680085" | grep deal | cut -d '|' -f 3,6
notify_if_not_frontmost 'LOTR DEAL AVAILABLE'
open 'https://www.bookme.co.nz/things-to-do/christchurch-canterbury-kaikoura/activity/lord-of-the-rings-edoras-tour-full-day-tour/$ACTIVITY_ID'
https://booking.doc.govt.nz/AvailabilityDisplay.aspx?sg=TNC&sd=21%2f02%2f18&mp=1
read ctl00_ctl00_bCPH_mCPH_availabilityView_ctrl1_Label2 to oturere_availability
echo "Oturere availability on the 21 Feb: " oturere_availability
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment