"I'll give you 10000 contiguous pages from Argos. You tell me the sum of the products" was the jist of the conversation.
Ok honoured Monks. I confess I haven't programmed in perl since the last century and things have moved one. Quills are no longer needed in my editor of choice.
So my thinking has been
my $req = HTTP::Request->new(GET => $targetURL);
my $res = $ua->request($req);
to snort the response code, if it's a 200, then
my $website_content = get($targetURL);
and regex the info out of the page I'm after and add it to a file.
Did it, but it's taking about a minute to process 100 pages.
Oh wise ones, point out the errors in my thinking. I'm on a fast connection. Is that the bottle neck? Can I get it going significantly faster?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.