Perl & LWP and over one million other books are available for Amazon Kindle. Learn more

Vous voulez voir cette page en français ? Cliquez ici.


or
Sign in to turn on 1-Click ordering.
or
Amazon Prime Free Trial required. Sign up when you check out. Learn More
More Buying Choices
Have one to sell? Sell yours here
Start reading Perl & LWP on your Kindle in under a minute.

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

Perl & Lwp [Paperback]

Sean M. Burke
4.5 out of 5 stars  See all reviews (8 customer reviews)
List Price: CDN$ 39.99
Price: CDN$ 25.19 & FREE Shipping. Details
You Save: CDN$ 14.80 (37%)
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
Only 1 left in stock (more on the way).
Ships from and sold by Amazon.ca. Gift-wrap available.
Want it delivered Tuesday, April 22? Choose One-Day Shipping at checkout.

Formats

Amazon Price New from Used from
Kindle Edition CDN $18.89  
Paperback CDN $25.19  

Book Description

June 30 2002 0596001789 978-0596001780 1

Perl soared to popularity as a language for creating and managing web content, but with LWP (Library for WWW in Perl), Perl is equally adept at consuming information on the Web. LWP is a suite of modules for fetching and processing web pages.

The Web is a vast data source that contains everything from stock prices to movie credits, and with LWP all that data is just a few lines of code away. Anything you do on the Web, whether it's buying or selling, reading or writing, uploading or downloading, news to e-commerce, can be controlled with Perl and LWP. You can automate Web-based purchase orders as easily as you can set up a program to download MP3 files from a web site.

Perl & LWP covers:

  • Understanding LWP and its design
  • Fetching and analyzing URLs
  • Extracting information from HTML using regular expressions and tokens
  • Working with the structure of HTML documents using trees
  • Setting and inspecting HTTP headers and response codes
  • Managing cookies
  • Accessing information that requires authentication
  • Extracting links
  • Cooperating with proxy caches
  • Writing web spiders (also known as robots) in a safe fashion
Perl & LWP includes many step-by-step examples that show how to apply the various techniques. Programs to extract information from the web sites of BBC News, Altavista, ABEBooks.com, and the Weather Underground, to name just a few, are explained in detail, so that you understand how and why they work. Perl programmers who want to automate and mine the web can pick up this book and be immediately productive. Written by a contributor to LWP, and with a foreword by one of LWP's creators, Perl & LWP is the authoritative guide to this powerful and popular toolkit.

Customers Who Bought This Item Also Bought


Product Details


Product Description

From Amazon

Perl and LWP explains how to write programs that browse the Web, using the excellent Library for the World Wide Web or LWP. It is aimed at developers who already know both Perl and HTML, although you don't need to be an expert in either.

The fascination of this topic is that it makes you see the Web in a different way, not as a set of pages for users to browse, but as a huge database for your programs to explore. The most robust technique for querying Web sites programmatically is through XML Web Services, but this approach is in its infancy. LWP takes a different route, called screen-scraping. In essence, your Perl code pretends to be a browser and grabs HTML for processing. Using LWP you could write a command-line program to search your favourite auction site, fetch news headlines, or check multiple retail sites for the best prices. As the author acknowledges, the problem with screen-scraping is its brittleness: if the target Web site adopts a new look, it breaks your code. There are also interesting fair usage issues. Even so, it's a powerful technique with many possible applications. This clear and concise guide comes complete with typically terse Perl code examples. Topics include LWP basics, posting form data, processing results with regular expressions, using trees to process HTML, imitating different browser types, and supporting cookies programmatically. An appendix offers handy information like HTTP status codes, character tables, and MIME types. LWP is large, but while this title does not attempt to cover all the modules, it does provide all you need to start coding your own Web-mining programs.--Tim Anderson

From the Publisher

The LWP (Library for WWW in Perl) suite of modules lets your programs download and extract information from the Web. Perl & LWP shows how to make web requests, submit forms, and even provide authentication information, and it demonstrates using regular expressions, tokens, and trees to parse HTML.. This book is a must have for Perl programmers who want to automate and mine the Web.

Inside This Book (Learn More)
Browse Sample Pages
Front Cover | Copyright | Table of Contents | Excerpt | Index | Back Cover
Search inside this book:

Customer Reviews

4 star
0
3 star
0
2 star
0
4.5 out of 5 stars
4.5 out of 5 stars
Most helpful customer reviews
Format:Paperback
If you aren't yet comfortable using object-oriented Perl modules, the multitude of examples will at least allow you see how it's done even if you're a bit fuzzy on what's happening 'underneath' when you call object methods. If you're comfortable learning how to do something without knowing exactly why it works, then the author's clear step-by-step explantions and numerous progressively more powerful examples should make this book accessible even to relatively innexperienced Perl programmers.
More experienced programmers will understand better why things work, but any Perl programmer will set this book down feeling empowered to turn the web into their own valet. No longer do you need to check multiple sites looking for interesting information. Instead, you can readily author code to do that for you and alert you when items of interest are found. You can use these tools to free up personal time, to harvest information to inform business decisions, to automate tedious web application testing, and a zillion other things.
The author's clear exploration of the relevant Perl modules leaves the reader with a good depth of understanding of what these modules do, when you might want to use which module, and how to use them for real world tasks. Before reading the book, I knew of these modules, but they were a rather intimidating pile. I'd used a few of them on occasion for rather limited projects, but was reluctant to invest the time required to read all of the documentation from the whole collection. Mountains of method-level documentation do not a tutorial make. This book takes all of that information, selects the most important parts, and ensures that those parts are covered in progressively more powerful and/or flexible examples.
Read more ›
Was this review helpful to you?
5.0 out of 5 stars Great book! March 15 2003
Format:Paperback
If you are unfamiliar with LWP and web scraping, or HTML parsing using tokens and trees, I strongly recommend this book. It's the best *introduction* to these topics I've been able to find. Sean's style is clear and concise-just what I expect from an O'Reilly book.
To get the most out of this book, you'll want to be familiar with Object Oriented programming in Perl, because (with the exception of LWP::Simple) all the modules discussed in this book use objects.
Also, don't expect the LWP sample code in the book to work correctly. Many of the sites that the scripts try to "scrape" have changed their layout since this book was published, braking the scripts. This isn't a problem though, because the samples Sean provides are very short and clear, so it's not necessary to run them in order to figure out how they work.
Was this review helpful to you?
1.0 out of 5 stars Terrible, bug-infested book... Nov. 5 2002
By Kevin
Format:Paperback
I really don't know how the previous 5 reviews gave this book 5 stars. I was really excited about this book when I first read the reviews, and now here I am only a few chapters in and already thinking about dumping it altogether. This book has so many flaws for its size, the biggest of which was the codes. I am no Perl expert, but could find my way around in a decent size program. However, no examples I have tried so far in the book actually worked, and some of these are just 10-20 lines long. I am completely new to LWP, I guess like anyone who would buy this book, so it's hard for me to see what the author is doing. The explanation of the code didn't help much either. As oppose to explaining the steps, he just said "the code below does this". And it's pretty obvious little or no editing has gone into this book. If you do buy this book, you'll probably want to make a trip to the Errata page at the Oreilly website. The amount of typos, printing errors, warnings and grammatical mistakes found by readers and editors listed on this page rivals the usuable content of the book itself. You know what, I have spent way too much on this book already.....
Was this review helpful to you?
5.0 out of 5 stars Exploit the web with power and ease Sept. 1 2002
Format:Paperback
Disclaimer: The author is an online-type-friend and I used to work with the author of the foreword. I even got my copy for free.
If the above hasn't totally disqualified me from commenting, I just wanted to note some things most reviewers have ignored.
The book is an excellent resource for two kinds of people.
Many people scan technical books looking for little scripts and thingies; a few lines changed and BOOM! They have the program they always wanted. Sean provides those in abundance.
It is also a good resource for a complete novice to learn about the hodgepodge of technologies we call the web - the ... wire protocol, markup languages, tree-based parsers, and encodings, to name just a few. The author is an expert in all of these, but has restrained himself to provide just enough information to get a programmer going. I was impressed time and again with how he manages to give the reader exactly enough knowledge to get their tasks done, with short but accurate explanations and pointers on where to learn more.
Best of all, this is a funny technical book. Usually if a technical book has pretensions to humor, it jabs you in the arm repeatedly with lots of groaner puns and dumb cartoons, in order to fill the space between bland code sections. But Sean has sprinkled the *code sections* with his dada sense of humor, which also highlights the difference between mere placeholder data and the concept being illustrated. And then the text gets right back to the point.
This is a slim work (242 pages, no thicker than my thumb) but packs a lot of value for your money. So buy it already.
My only criticism is that it is exclusively focused on consuming services on the web - like downloading TV listings and so on.
Read more ›
Was this review helpful to you?
Want to see more reviews on this item?
ARRAY(0xb588b468)

Look for similar items by category


Feedback