Skip to content

Instantly share code, notes, and snippets.

@swt02026
Created May 17, 2019 08:39
Show Gist options
  • Save swt02026/46f398d34acfd93008369ab2e55605b1 to your computer and use it in GitHub Desktop.
Save swt02026/46f398d34acfd93008369ab2e55605b1 to your computer and use it in GitHub Desktop.
kkc.sh
#!/usr/bin/env bash
touch nowKKTIX
cp nowKKTIX previousKKTIX
for i in `seq 1 1 50` ; do if ! curl -s https://kktix.com/events?page=$i | ~/go/bin/pup "li.clearfix h2 a[href] "; then break; fi; done | ~/go/bin/pup "a[href] json{}" | jq '.[] | "\(.href) ||| \(.text)"' | sort > nowKKTIX
diff nowKKTIX previousKKTIX | egrep '^<' > diff.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment