Perl libwww--LWP::Simple
Charles Maner
ckjmaner at yahoo.com
Sun Sep 4 16:04:02 PDT 2005
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 at pair.com> wrote:
> in message
>
<20050904172305.32264.qmail at 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
>
> --
>
>
More information about the freebsd-ports
mailing list