Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: Preserving newlines with Web::Scraper

by nysus (Parson)
on Dec 25, 2018 at 11:38 UTC ( #1227692=note: print w/replies, xml ) Need Help??

in reply to Preserving newlines with Web::Scraper

Dug through the source code and hacked Web::Scraper to add the following to line #118: $t->no_space_compacting(1)

This changes the behavior of HTML::TreeBuilder module used by Web::Scraper to find the nodes in the HTML document. Maybe there is a better way, though?

UPDATE: this comment was made shortly after first comment without seeing it so is duplicative.

$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar";
$nysus = $PM . ' ' . $MCF;
Click here if you love Perl Monks

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1227692]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (1)
As of 2022-01-28 06:55 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (73 votes). Check out past polls.