Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use WWW;
- use DOM::Tiny;
- use Text::CSV;
- use URI::Encode;
- constant OUT_FILE = 'results2.txt'.IO;
- my $term = uri_encode "Babesiosis";
- my $year = 2001;
- #"temp".IO.spurt: get "https://patents.google.com/xhr/query?url=q%3D$term%26country%3DUS%26before%3D20010101%26after%3D20011231&exp=&download=true";
- "temp".IO.spurt: get "https://patents.google.com/?q=Babesiosis&country=US&before=20011231&after=20010101;
- my $results-num = csv(:in<temp>).elems - 2;
- say $results-num;
- OUT_FILE.spurt: :append, "$term,$year,$results-num\n";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement