Created
February 13, 2013 19:41
-
-
Save anonymous/4947480 to your computer and use it in GitHub Desktop.
Simple Perl script to grab census links using wkhtmltopdf.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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