My Account
View Cart
Home
Community
Books & Videos
Safari Books Online
Conferences
Training
School of Technology
About
Complete List
Bestsellers
New Releases
Rough Cuts
Upcoming Titles
Ebooks
By Publisher
By Series
Out of Print
Order Info
Search
Search Tips
Tell a friend
Perl & LWP
By
Sean M. Burke
June 2002
Pages: 260
|
Table of Contents
|
Index
|
Sample Chapter
|
Colophon
Table of Contents
Chapter 1
Introduction to Web Automation
The Web as Data Source
History of LWP
Installing LWP
Words of Caution
LWP in Action
Chapter 2
Web Basics
URLs
An HTTP Transaction
LWP::Simple
Fetching Documents Without LWP::Simple
Example: AltaVista
HTTP POST
Example: Babelfish
Chapter 3
The LWP Class Model
The Basic Classes
Programming with LWP Classes
Inside the do_GET and do_POST Functions
User Agents
HTTP::Response Objects
LWP Classes: Behind the Scenes
Chapter 4
URLs
Parsing URLs
Relative URLs
Converting Absolute URLs to Relative
Converting Relative URLs to Absolute
Chapter 5
Forms
Elements of an HTML Form
LWP and GET Requests
Automating Form Analysis
Idiosyncrasies of HTML Forms
POST Example: License Plates
POST Example: ABEBooks.com
File Uploads
Limits on Forms
Chapter 6
Simple HTML Processing with Regular Expressions
Automating Data Extraction
Regular Expression Techniques
Troubleshooting
When Regular Expressions Aren't Enough
Example: Extracting Linksfrom a Bookmark File
Example: Extracting Linksfrom Arbitrary HTML
Example: Extracting Temperatures from Weather Underground
Chapter 7
HTML Processing with Tokens
HTML as Tokens
Basic HTML::TokeParser Use
Individual Tokens
Token Sequences
More HTML::TokeParser Methods
Using Extracted Text
Chapter 8
Tokenizing Walkthrough
The Problem
Getting the Data
Inspecting the HTML
First Code
Narrowing In
Rewrite for Features
Alternatives
Chapter 9
HTML Processing with Trees
Introduction to Trees
HTML::TreeBuilder
Processing
Example: BBC News
Example: Fresh Air
Chapter 10
Modifying HTML with Trees
Changing Attributes
Deleting Images
Detaching and Reattaching
Attaching in Another Tree
Creating New Elements
Chapter 11
Cookies, Authentication,and Advanced Requests
Cookies
Adding Extra Request Header Lines
Authentication
An HTTP Authentication Example:The Unicode Mailing Archive
Chapter 12
Spiders
Types of Web-Querying Programs
A User Agent for Robots
Example: A Link-Checking Spider
Ideas for Further Expansion
Appendix A
LWP Modules
Appendix B
HTTP Status Codes
100s: Informational
200s: Successful
300s: Redirection
400s: Client Errors
500s: Server Errors
Appendix C
Common MIME Types
Appendix D
Language Tags
Appendix E
Common Content Encodings
Appendix F
ASCII Table
Appendix G
User's View of Object-Oriented Modules
A User's View of Object-Oriented Modules
Modules and Their Functional Interfaces
Modules with Object-Oriented Interfaces
What Can You Do with Objects?
What's in an Object?
What Is an Object Value?
So Why Do Some Modules Use Objects?
The Gory Details
Colophon
Return to
Perl & LWP