Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Sep 2005 16:04:01 -0700 (PDT)
From:      Charles Maner <ckjmaner@yahoo.com>
To:        Parv <parv@pair.com>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: Perl libwww--LWP::Simple
Message-ID:  <20050904230401.9653.qmail@web54501.mail.yahoo.com>
In-Reply-To: <20050904213928.GA17782@holestein.holy.cow>

next in thread | previous in thread | raw e-mail | index | archive | help

Hi Parv--thanks for the reply.  My code, on all three
platforms, is:

##### Begin Code ##########
use strict 'vars';
use strict 'subs';

use LWP::Simple;

LWP::Simple::getstore("http://biz.yahoo.com/i/","tickers.html")
or die("Website not found!\n");

open TICKERS, "tickers.html";

my @tickers = <TICKERS>;

print "@tickers\n";

close TICKERS;

exit;
##### End Code ##########

This code runs fine on Win32/ActivePerl as well as
MacOSX Tiger/10.4.

Also, I use Firefox with cookies disabled from this
site  and the website downloads just fine within the
browser.  

So....

Thanks--I look forward to any suggestions.


--Charles

--- Parv <parv@pair.com> wrote:

> in message
>
<20050904172305.32264.qmail@web54515.mail.yahoo.com>,
> wrote Charles Maner thusly...
> >
> > When I use getstore to retrieve an actual 
> filename such as
> > .pdf/.ppt/.jpg, LWP::Simple::getstore works
> well/as advertised.
> > However, if it's plain html, (e.g.,
> http://biz.yahoo.com/i/), it
> > does not return an error code, but also returns no
> filename
> > either.  The identical code, as indicated above,
> runs as is
> > beautifully on Win32 (ActiveState Perl 5.8.7)
> ...
> > I do notice, though, this site wants to plant a
> cookie.  Would
> > this be an issue on FreeBSD's libwww port?  If so,
> any idea how to
> > fix it/work around or should I use the
> LWP::UserAgent module?
> 
> In case you think cookies are giving you trouble ...
> How do you deal
> w/ cookies in your code? Have you tried getting the
> Yahoo page that
> you are interested in w/o cookies in any other user
> agent (aka web
> browser)?
> 
> Can you supply the minimum runnable code which
> generates the problem
> for you?
> 
> 
> 
>   - Parv
> 
> -- 
> 
> 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050904230401.9653.qmail>