Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Downloading the HTML-code of a web page is easy. LWP::Simple is the traditional Perl way of doing it.

use Modern::Perl; use LWP::Simple; my $content = get('http://www.sec.gov/Archives/edgar/data/935226/00011 +4420411058092/0001144204-11-058092-index.htm'); say $content;
Of course that is only the simple part of your task. Extracting what you need is the difficult part.

HTML::Treebuilder is one of the HTML parsing modules that can be helpful here.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

My blog: Imperial Deltronics

In reply to Re: Help with web crawling by CountZero
in thread Help with web crawling by eversuhoshin

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, 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, 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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    [Your Mother]: I think Trump might be better specifically because no one respects him so he won't get his way the way the others did.
    [Your Mother]: (I certainly did not vote for him and have been an outspoken critic of his for three decades, by the by.)
    [erix]: I'd like Russia threatened a bit more, flattered a bit less
    [Your Mother]: The last two regimes killed a million, displaced 10 million, torture prisons, and ruined countries… somehow it's magically bad _now_.
    [erix]: what/who are the last two regimes?
    [Your Mother]: Bush/Obama. 15 straight years of warfare, torture, etc, etc.
    [Your Mother]: All caused by the political fallout of Carter/Reagan when the Afghan chickens came home to roost on 9/11.
    [Your Mother]: US foreign policy is toxic and like a broken record.
    [erix]: still, dismantling NATO is a /bad/ idea
    [Your Mother]: I know. I am a buzzkill.

    How do I use this? | Other CB clients
    Other Users?
    Others taking refuge in the Monastery: (5)
    As of 2017-01-20 01:07 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      Do you watch meteor showers?




      Results (173 votes). Check out past polls.