Skip to content

Instantly share code, notes, and snippets.

@matsuu
Created March 16, 2009 15:01
Show Gist options
  • Select an option

  • Save matsuu/79912 to your computer and use it in GitHub Desktop.

Select an option

Save matsuu/79912 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
use strict;
use warnings;
use Web::Scraper;
use URI;
my $scraper = scraper{
process '//img[contains(@src,"/clk/")]', img => '@src';
};
while(1){
my $uri = URI->new('http://www.bijint.com/jp/clocks/view/');
if($uri) {
my $res = $scraper->scrape($uri);
system(sprintf('feh --bg-scale %s', $res->{img}));
}
sleep 60;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment