lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lynx-dev Confused by lynx error message... help!


From: Heather Stern
Subject: Re: lynx-dev Confused by lynx error message... help!
Date: Fri, 28 May 1999 14:52:58 -0700 (PDT)

I ate the fortune cookie first, then read what Dave Taylor wrote:
> Greetings Lynx developers!
> 
> I'm using lynx in batch mode to do remote searches and return the results
> as raw HTML, and it works like a charm 99% of the time, but sporadically
> I'll see:
> 
>    lynx: Can't access startfile 
>               http://search.auctions.yahoo.com/search/auc?p=spangle+the+bear 
> 
> But what's confusing is that I'll do another query with the same script
> and it'll work just fine.  

As Philip noted, this means the site couldn't be reached at that moment.
Unlike certain other browsers... lynx only tries the once.  In my opinion
this is an advantage, my local net doesn't take a beating trying repeats to
a site that's possibly not there, and I can decide on my own.  However your
mileage varies in this fashion, you'll have to put that decision into your
script.  When I was scripting with lynx I normally did sleep 1 second between 
tries, and tried 5 times.

Lynx returns errorlevel 255 when a startfile isn't accessible, at least on
my version, Lynx Version 2.7.2 (1997) for Linux, the compiled copy that came
with SuSE 5.2.

> I'm running:
>   % lynx -version
>   Lynx Version 2.8.1rel.2 (1998)
> On RedHat Linux r6.0.

I don't think that the try-once behavior has changed since the early days,
but yours is much newer than mine (yes, I'm a flake, but my laptop has a 
newer version).  You can run lynx -help and see if the commandline offers 
a retry count... I don't remember such a feature request floating by, but 
hey, this is all volunteer, so maybe it's in there anyway.

> The invocation is:
>    % lynx -source http://search.auctions.yahoo.com/search/auc?p=$pattern
> and the output is fed to a variety of Unix commands to extract the
> specific information I seek.

Some people might claim wget or some other mirror-tool would be better but 
in this case I would disagree; you know what you want, and it's only one 
page, so this should work great.  

Is there a reason you use -source instead of -dump?  If you don't need to 
grodgel through the HTML code you can at least save your script some of the
effort.  Hidden form fields won't show in a plain -dump though.

> Can anyone offer any ideas or insight on how to understand and avoid
> this problem in the future?
> 
> Thanks!
> Dave Taylor                                         address@hidden

I hope this was useful to you.  Have a great weekend.

  . | .   Heather Stern                  |         address@hidden
--->*<--- Starshine Technical Services - * - address@hidden
  ' | `   Sysadmin Support and Training  |        (800) 938-4078

reply via email to

[Prev in Thread] Current Thread [Next in Thread]