Skip to content

Instantly share code, notes, and snippets.

@lg
Created July 23, 2023 09:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lg/07227669bacc1cb9ca46ea5f1ba1a78a to your computer and use it in GitHub Desktop.
Save lg/07227669bacc1cb9ca46ea5f1ba1a78a to your computer and use it in GitHub Desktop.
amc tickets
function runcheck() {
while true; do curl -s "$1" | pup 'script#apollo-data json{}' | jq '.[] | .text | fromjson | .[] | select(.__typename=="Seat" and .available==true and .type != "Wheelchair" and .type != "Companion") | .column' | awk '{if (p == $1 - 1) {print "Found: " $1 " and " p}; p = $1}' | grep Found && say "go buy tickets $2"; sleep 5; done
}
runcheck "https://www.amctheatres.com/movies/oppenheimer-66956/showtimes/oppenheimer-66956/2023-07-23/amc-metreon-16/all/111398221" "tomorrow 2:30pm"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment