Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: Web Scraping with Find / Replace (Mojo::DOM)

by beech (Parson)
on Dec 04, 2016 at 20:55 UTC ( [id://1177169]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Web Scraping with Find / Replace (Mojo::DOM)
in thread Web Scraping with Find / Replace

Well,

If you add a base tag to the html content, then there is no need to rewrite relative links into absolute links, its a shortcut provided by html

The spew part of the code does that with a helper module for creating a file

Second part shows creating/modifying a base tag with Mojo which will htmlescape the url

  • Comment on Re^3: Web Scraping with Find / Replace (Mojo::DOM)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-04-24 05:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found