LWP User Agent/HTTP Request help needed!

From: Bumble (bumble_at_what.the.heck)
Date: 02/28/04


Date: Sat, 28 Feb 2004 18:48:48 -0000

Hey all, basically I've got the LWP User Agent all working, it retrieves a
HTML page at the specified HTTP location... Now I only need a small part of
the HTML, the bit with the actual data in, what's the best way of doing
this? I was originally outputting the retrieved HTML to a HTML file and then
reading the file in, line by line until I found the required data and then
extracting that... However this requires creating a file on the server, of
which I don't seem to have permission to do, and seems a bit of a long
winded way of doing it. Is there a better way? Can I do a search of the my
$response variable somehow and then just store the bit I need? I am working
on getting file writing access on server, as I need to store the data
somehow...

Here is a snippet of the code...

$ua = LWP::UserAgent->new;
$ua->proxy('http', 'cache address here');

$request = HTTP::Request->new('GET', http://address here);

my $response = $ua->request($request);

-- 
Bumble


Relevant Pages

  • Re: Content-Type (was Safari - RSS)
    ... then retrieves a content-type that it doesn't understand, ... initial request, and something else (let's say application/xml, for ... MSIE's initial Accept header depends on which Office products one has ... qs=1.0 HTML variant. ...
    (comp.infosystems.www.authoring.html)
  • POST fails in HTTP::Request
    ... from the HTML ... but the server does not seem to understand the POST request and retrieves ...
    (comp.lang.perl.modules)
  • Re: LWP User Agent/HTTP Request help needed!
    ... > Hey all, basically I've got the LWP User Agent all working, it retrieves a ... > HTML page at the specified HTTP location... ...
    (comp.lang.perl.misc)
  • Re: HTML text marker
    ... Wget is a fine tool, but that's what a browser does: It retrieves ... > a website's content THEN processes the HTML in the files it ...
    (comp.os.linux.misc)
  • Re: Cool Spotlight "feature"...
    ... it is the responsibility of the app to store date ... It would appear it's just indexing the html files as plain text> so, ... I assumed I would be able to search the history from within Safari itself, ... It uses its own buttons, drop-downs, menus, tabs, everything. ...
    (comp.sys.mac.advocacy)