Skip to content

Instantly share code, notes, and snippets.

@caiguanhao
Last active March 24, 2016 07:41
Show Gist options
  • Save caiguanhao/34f6e89b18df3fdca4d2 to your computer and use it in GitHub Desktop.
Save caiguanhao/34f6e89b18df3fdca4d2 to your computer and use it in GitHub Desktop.
iPhone on sale notification
while :; do \
curl -Ls 'http://www.apple.com/cn/shop/buy-iphone/iphone-se/64gb-金色' | \
grep -q '暂无供应' && \
sleep 10 || { \
printf 'iPhone is OK to buy right now' | \
wechat-notify --raw 'oBjSswsfgSvA6FlrR0rszh5eThhI@CGH' && \
break; \
}; done
while :; do \
curl -Ls 'http://www.apple.com/cn/shop/goto/iphone_se/select' | \
grep -q 'be back soon' && \
sleep 10 || { \
printf 'iPhone is OK to buy right now' | \
wechat-notify --raw 'oBjSswsfgSvA6FlrR0rszh5eThhI@CGH' && \
break; \
}; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment