in reply to LWP::SIMPLE fails on certain URL

Have you checked the content of the result? I get:
<!-- pcache/1.7.3 Cache loaded from file on warrant Sun Jan 27 03:31:0 +6 2002 --> <!-- $Id: WirePortal.pcgi,v 1.10 2001/12/13 21:04:53 jxu Exp $ --> <HTML> <HEAD> <META HTTP-EQUIV=Refresh CONTENT="1; URL=/public_pages/WirePortal.pcgi +/nojs.html"> <TITLE>Testing JavaScript</TITLE> <script language="JavaScript"> <!-- function gogo() { self.location.href='/public_pages/WirePortal.pcgi/us_portal.html' } // --> </script> <BODY BGCOLOR="#FFFFFF" onload="gogo()"> </BODY> </HTML>
This looks like a redirect to me. I would suggest looking at the page that it redirects to (preferably the non-javascript one) or finding out from the administrators of the site where you should be looking at.

grep
grep> cd pub
grep> more beer

Replies are listed 'Best First'.
Re: Re: LWP::SIMPLE fails on certain URL
by cdherold (Monk) on Jan 27, 2002 at 14:21 UTC
    Hmmm ... i did check the content of the result and nothing was there. I ran the program in the browser, viewed the source and zilch. Regarding what you managed to pull off the site ... it's interesting that the portion retreived is only a fraction of what can be viewed if the URL is entered in the "Address:" box of the browser and source code viewed. I'm still unclear on what may be happening here.
      Here is the code I used:
      #!/usr/bin/perl -w use strict; use LWP::Simple; my $url = "http://wire.ap.org/APnews/center_minor.html?FRONTID=SCIENCE +"; my $body = get("$url"); print "$body";

      If this helps $LWP::Simple::VERSION = 1.35

      Update: I ran it a couple more times and I continue to get content.

      grep
      grep> cd pub
      grep> more beer
        Keep getting "internal server error" using code you posted above. don't know why exactly that if worked for you it shouldn't work for me. will try again later. need to get sleep now. thanks for your input and help.