I didn't use TableExtract on this site, but it does come up frequently. Had I gone with the runner-up: http://www.brainyquote.com/quotes/keywords/gratitude.html, then we would be heading down that road. I'm curious how similar a task it is to get the content from this link as opposed to the one in the original post. Now that I see http://www.brainyquote.com/quotes_of_the_day.html, I wonder if it may not have been my best option.

As it stands, I'm using HTML::TreeBuilder, and I'm getting nothing:

C:\cygwin64\home\Fred\pages2\list>perl scraper1.pl nix! C:\cygwin64\home\Fred\pages2\list>type scraper1.pl #! /usr/bin/perl use warnings; use strict; use 5.010; use HTML::TreeBuilder 5 -weak; my $site = 'http://www.fourmilab.ch/yoursky/cities.html'; my $tree = HTML::TreeBuilder->new_from_url($site); foreach my $e ($tree->look_down(_tag => 'div')) { foreach my $f ($e->look_down(_tag => 'p')) { say $f->as_text; } } say "nix!"; C:\cygwin64\home\Fred\pages2\list>

In reply to Re^2: regex to get random quote by Aldebaran
in thread regex to get random quote by Aldebaran

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.