This is an addendum to my last post on web scraping with perl and HTML::TreeBuilder. I've named the script Roboshop.
Ok, I've rewritten the roboshop script. Now it's shorter, and more reliable (as reliable as a webscrapper can be)
So If you want code(you got it) (yeah, I know it sounds better with "if you want blog, you got it", but there's little chance I can make this pun, and AC/DC is cool anyway).
The site seems to send different html pages depending on some (unknown to me) variables.
So I analyzed the two variants. At present version (alpha 0.01) it just outputs an array with prices, but I'm in the process of making it cooler, and send me mails when it finds some interesting thing in the INTERNETZ.
Here you can see the use for HTML::Element look_down with chained calls to get the desired node. Apart from cpan, there's more info here.
I'm thinking about writing a WWW::Search subclass too. We'll see...
Btw, I don't understand why perl isn't syntax-highlighted when embedded in the blog. If you have any pointers, I'd be very happy to hear a way to solve that. Sorry for the inconvenience.
See ya in the next post.
Thanks for the shopped Artwork go to nabax. =)