in reply to Re: How To Write A Scraper?
in thread How To Write A Scraper?
So rather than have script A which says
and another script B which does the same, and another script C with yet another, and so on, at least I could push the complexity down into a module, object etc and not have to see it, and not have to write multiple scripts for multiple publications.# ... having got to a certain page $mech->content() =~ m/LONGFIDDLYCAPTURINGREGEXHERE/; my $place_where_the_links_are = $1; # get the links from that place and continue
And the moment the NYT changes their HTML, someone could figure out the new regex and update Scraper::Newspapers::NYT or whatever it would be.
($_='kkvvttuu bbooppuuiiffss qqffssmm iibbddllffss')
=~y~b-v~a-z~s; print
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How To Write A Scraper?
by jpeg (Chaplain) on Jul 04, 2005 at 00:25 UTC | |
by Cody Pendant (Prior) on Jul 04, 2005 at 00:46 UTC | |
by Cody Pendant (Prior) on Jul 04, 2005 at 01:05 UTC |