Hello Monks, I'm learning to use the perl modules. As a learning step I'm interested in writing a scrapper to get articles from Hoovers once a week so I can read them offline during the weekend. I was hoping to get some design tips from more experienced coders on writing screen scrappers.

Here's what I know of the source. Hoovers keeps 30 days of articles online and displays 10 articles at a time. I can find the older article by following the link: http://hoovnews.hoovers.com/fp.asp?layout=chak&industry=Hoovers+Earnings+%26+Forecasts&starting=11&symbol=

By changing the starting=nn value, I can cycle through until a page error.

Some design decisions, I need to make:

1. How do I keep track of the articles that have already been downloaded? Should I have a simple file that keeps track of the last linked article? Or is it better to have a formatted index file that has the Link Text and the Timestamp of when it was d/led?

2. Should I use WWW::Mechanize for this or is it better to use the HTML::TableExtract and cycle through the Next link? Which is more efficient?

3. I'm thinking of creating a weekly directory so I don't have all the links in one large directory.

Any other gotchas or things to keep in mind?


In reply to Designing a web scrapper by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.