Skip to content

Instantly share code, notes, and snippets.

Created February 13, 2013 19:41
Show Gist options
  • Save anonymous/4947480 to your computer and use it in GitHub Desktop.
Save anonymous/4947480 to your computer and use it in GitHub Desktop.
Simple Perl script to grab census links using wkhtmltopdf.
use strict;
use warnings;
system(qw(
c:/Progra~1/wkhtmltopdf/wkhtmltopdf.exe
https://familysearch.org/search/records/results#count=20&query=%2Bgivenname%3Atest~
c:/temp/output.pdf
)) == 0 or die "Cannot convert: $?";
open my $file, '<:crlf', 'c:/temp/output.pdf';
while (<$file>) {
next unless m(familysearch.org/pal);
chomp; s/.*\(//; s/\).*//;
my $url = $_;
# ...do something with $url...
print "==> Found URL: $url\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment