Assuming I will get notification from this faster than the email or click to refresh methods.
#!/usr/bin/perl -w
use strict;
use Curses;
$| = 1;
use LWP::UserAgent;
my $url = "https://play.google.com/store/devices/details?id=nexus_4_16gb";
my $agent = LWP::UserAgent->new();
initscr();
while (1) {
my $now = `/bin/date`;
my $response = $agent->get($url);
if ($response->{_content} =~ /Notify me/) {
print "$now";
} else {
flash();
}
sleep(1);
}
wrote it myself. see below. only problem I saw is it bounced back and forth between flashing and thinking it wasn't available yet at first -- assuming this is because they have some load balancing going on across servers and not all servers were updated at the exact same time.
Code:#!/usr/bin/perl -w use strict; use Curses; $| = 1; use LWP::UserAgent; my $url = "https://play.google.com/store/devices/details?id=nexus_4_16gb"; my $agent = LWP::UserAgent->new(); initscr(); while (1) { my $now = `/bin/date`; my $response = $agent->get($url); if ($response->{_content} =~ /Notify me/) { print "$now"; } else { flash(); } sleep(1); }