Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^3: Trivial HTML extractor utility

by hossman (Prior)
on Nov 22, 2007 at 21:17 UTC ( #652452=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Trivial HTML extractor utility
in thread Trivial HTML extractor utility

Not for me; I don't know how to write an xpath expression.
...
I wonder what value you see in enhancing the features of a program that already has way more features than have ever been used.

Fair enough ... but I suspect if you knew XPath my comment would make more sense.

you strike me as the kind of guy who whips up little scripts to solve problems a lot -- heck, anyone who uses perl on a regular becomes thta kind of person if they weren't already. as you say: right now it's got a feature you've never used (the ability to pick an arbitrary tag name at run time) and if you never use the script again oh well ... it's not like it took you a lot of work to code it right? But if at some point in your life you think "i need to get the <h1> tags out of all these HTML pages", you might remember your handy script use it, and then realize what you really want is the *first* <h1> out of all the files, and you'd probably add a quick option to let you pick the first instance. Then maybe 6 months later you're crunching some more HTML files and you want the "content" attribute of any <meta http-equiv="refresh" ... > tags ... so you crank out another little script.

Or, if you know XPath, the first time you need a something a little more complicated then just all values of all the tags with a certain name, you add about 12 characters to your current script, and start passing some simple XPath expressions on the command line.

Or you don't.

Like you say: it's a trivial utility ... if it does everything you want then call it a day and go fishing. To answer your specific question: The value I see in enhancing it comes from the ability to gain large amount of additional functionality from a small amount of additional work.


Comment on Re^3: Trivial HTML extractor utility
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2014-09-16 03:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (155 votes), past polls