Back

Nexus 4

|

[Nexus 4](https://play.google.com/store/devices/details?id=nexus_4_16gb)今天出货。但是仅仅过了5分钟,16G版(@AU)就被抢光了。
现在这个年月,买东西都得靠抢了。
[cc lang="bash"]
#!/bin/bash
content=""
while [ -z $content ]; do
content=`curl --user-agent "mozilla" --silent "https://play.google.com/store/devices/details?id=nexus\_4\_16gb" | grep -o -i "In Stock"`
sleep 10
done
echo "Nexus 4 is now available"|mail -s "Nexus 4 is coming" [email protected]
[/cc]

商店自带的通知功能只能告诉你"already sold out",所以写了这个简单的bash循环。
用curl每10秒刷一次play商店,一旦有货即邮件通知。我用screen命令把它放到了后台,静候佳音吧。

No comments yet

Leave a comment

About me

I live in Tasmania, an island a little far from the rest of the world and very close to the sea.
Father of two little girls, have two puppies.

Work

Work in IT industry, AI is my working partner.