Check when Nexus 4 has stock again
If you want to get a Nexus 4 and you are waiting for the Play Store to get new stock, you can automatically check by using this bash script:
#!/bin/bash
while true
do
if [ `curl "https://play.google.com/store/devices/details?id=nexus_4_16gb" | grep -io "Sold out" | wc -l` -lt 1 ]
then
echo "In stock"
# You can send yourself an email here
exit 1
fi
echo "Not in stock :("
sleep 900
done
Written by Diego Pérez
Related protips
1 Response
Gorgeous!! Here Spanish version that send push using PushOver
#!/bin/bash
while true
do
if [ `curl "https://play.google.com/store/devices/details?id=nexus_4_16gb&hl=es" | grep -io "AGOTADO" | wc -l` -lt 1 ]
then
echo "In stock"
curl -s -F "token=TOKEN_APP" -F "user=USER_KEY" -F "message=Corre por el Nexus 4" https://api.pushover.net/1/messages.json
exit 1
fi
echo "Not in stock :("
sleep 120
done
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#