Re: LWP module - parse one line at a time (only download part of a page)
- From: "nobull@xxxxxxxx" <nobull67@xxxxxxxxx>
- Date: 20 Jan 2006 12:56:12 -0800
Alf McLaughlin wrote:
> I want to download a fairly large amount of data from a webpage
> (~10MB), but the stuff I'm really interested in is always toward the
> top of the page (however, I don't know exactly where). Since I'm only
> interested in two or three lines, I don't want to download the whole
> page. I would like download until I see what I want (such as my
> $current_line =~ /WHAT I WANT/) and then kill the download.
Read the description of the get() method of LWP::UserAgent.
In particular note the existance of the callback and the bit where it
says "The callback can abort the request by invoking die()."
.
- Follow-Ups:
- References:
- LWP module - parse one line at a time (only download part of a page)
- From: Alf McLaughlin
- LWP module - parse one line at a time (only download part of a page)
- Prev by Date: Re: Selective Redirect with LWP::Parallelel::Useragent
- Next by Date: Re: LWP module - parse one line at a time (only download part of a page)
- Previous by thread: LWP module - parse one line at a time (only download part of a page)
- Next by thread: Re: LWP module - parse one line at a time (only download part of a page)
- Index(es):
Relevant Pages
|
|