Anyone else running perl/python/etc script to watch the google play page?

Woosh

Well-known member
Dec 6, 2010
922
3
18
Visit site
Assuming I will get notification from this faster than the email or click to refresh methods.

You won't even get the email till its sold out. :p

But ya, using check4change in 10s intervals atm. Hopefully I can get to it fast enough for an order.
 

mr19

Active member
Jun 25, 2010
41
0
0
Visit site
I'm running a perl script looping every 1 sec. Have it set to start flashing the terminal when it's for sale.
 

mr19

Active member
Jun 25, 2010
41
0
0
Visit site
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);
}
 

cinek

Well-known member
Oct 4, 2012
226
0
0
Visit site
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);
}

comes up with an error:

C:\Users\a\Desktop>"check store.pl"
Can't locate Curses.pm in @INC (@INC contains: C:/Perl64/site/lib C:/Perl64/lib
.) at C:\Users\a\Desktop\check store.pl line 5.
BEGIN failed--compilation aborted at C:\Users\a\Desktop\check store.pl lin
e 5.

C:\Users\a\Desktop>"check store.pl"
Can't locate Curses.pm in @INC (@INC contains: C:/strawberry/perl/site/lib C:/st
rawberry/perl/vendor/lib C:/strawberry/perl/lib .) at C:\Users\a\Desktop\c
heck store.pl line 5.
BEGIN failed--compilation aborted at C:\Users\a\Desktop\check store.pl lin
e 5.
 

mr19

Active member
Jun 25, 2010
41
0
0
Visit site
Curses is an add-on package that doesn't come default with Perl. You'll have to install that package, my guess is the LWP::UserAgent will fail as well.