[Top][All Lists]

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

lynx-dev Re: Scripting LYNX to follow links

From: Yury Burkatovsky
Subject: lynx-dev Re: Scripting LYNX to follow links
Date: Tue, 26 Oct 1999 14:44:33 +0200 (IST)

lynx captures stdin and can't be invoked as something listening to its
input pipe. The only exception is feeding lynx with form parameters when
invoked with -get_data/post_data switches.

I forward you a mail posted to this list ca a year ago that contains
some practical recommendations how to set up a lynx session under expect's
control. Surprisingly, it bears the same Subject: line.

Happy "expecting".
Regards,                                                |       /^^^\
        Yury                                            |     (| , , |)
                                                        |      |  *  |
E-mail: yury.burkatovsky at telrad dot co dot il        |       \_-_/

On Mon, 25 Oct 1999, Jeff Haferman wrote:

> However, if I try to do this non-interactively, whether with a
> "here" document, redirection of STDIN from a file, or using the
> "-get_data" command line option with a file with the commands and
> a terminating "---" line, I never get off the home page nor is the
> print command executed.
> Is lynx capable of what I am attempting?  (I am using lynx v2.8rel2 for
> UNIX).  If so, how do I do it?  Otherwise, can you suggest a more
> appropriate tool?  I'm fairly new at this, so I might need a few
> specifics.

On Tue, 7 Jul 1998, Sinan Kaan Yerli wrote:
> Date: Tue, 7 Jul 1998 20:48:36 +0100
> Subject: Re: Scripting LYNX to follow links
> (07/07/1998 14:35) Ron Todd:
> >Actually, I don't need keystroke recording, only replay or equivalent.
> >Am I still out of luck?  I want to drive lynx from a shell script or C
> >program that programatically generates the keystrokes for my lynx
> >script, based on my program's analysis of each page that I print to
> >a file.
> Have you tried 'expect'?
> Here is a _possible_ fragment that you can start with:
> #!/usr/local/bin/expect -f
> #some settings that you may have to do beforehand
> ...
> spawn lynx
> #assuming advanced mode
> expect -re "(-more- )*(file|http|ftp):"; send "\t\t\t\r"
> #continue until you reach your page by doing this expect/send couple
> expect ....; send "...\r"
> #and then turn the 'log_user' on and receive whole page (but with all
> #the escape characters) -or- as you said use 'send "p\r"' to save the
> #page using lynx process
> something like this...
> And there is more to this; you can have user input while within lynx
> session. You can slow down the comm. line or increase, you can basicly
> navigate _within_ the lynx session and
> get/record/interpret/interact/save/log the sections of the outputed text
> to the tty.
> Anyway 'expect' is good piece of software when it is used properly.
> Best advice is to start from the example directory of the package
> (sorry, I dont't know the http address from top of my head).
> I hope this helps.
> -- 
> Sinan Kaan Yerli <address@hidden>

reply via email to

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