fork download
  1. #!/usr/bin/perl
  2. use LWP::Simple;
  3. use Date::Format;
  4. use DateTime::Format::Strptime;
  5.  
  6. my $maxpage = 901
  7. my $strp = new DateTime::Format::Strptime(pattern => "%b %d %Y",on_error=>'croak');
  8. my $strf = new DateTime::Format::Strptime(pattern => "%Y-%m-%d",on_error=>'croak');
  9.  
  10.  
  11. for (my $i = 1; $i <=$maxpage; $i++){
  12. my $url = "http://w...content-available-to-author-only...r.com/projects/597507018/pebble-e-paper-watch-for-iphone-and-android/backers?page=$i";
  13. my $content = get $url;
  14. die "Couldn't get $url" unless defined $content;
  15.  
  16. while($content =~ m/<div class="date">([^<]*)/g){
  17. $date=$1;
  18. if($date =~ m/^\d/){
  19. my @dt = localtime(time);
  20.  
  21. print strftime("%Y-%m-%d\n",@dt);
  22. }
  23. else{
  24. my $formatted = $strp->parse_datetime("$date 2012");
  25. print $strf->format_datetime($formatted)."\n";
  26. }
  27. }
  28. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
===SORRY!===
Unable to find module 'Date::Format' in the @*INC directories.
(@*INC contains:
  /home/3eICPn/.perl6/lib
  /usr/lib/parrot/2.7.0/languages/perl6/lib
  .)
stdout
Standard output is empty