lynx-dev
[Top][All Lists]
Advanced

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

Re: lynx-dev -post_data sample please


From: Klaus Weide
Subject: Re: lynx-dev -post_data sample please
Date: Fri, 20 Aug 1999 21:52:26 -0500 (CDT)

On Fri, 20 Aug 1999, Reza wrote:

> Klaus Weide wrote:
> > 
> > On Tue, 17 Aug 1999, Reza wrote:
> > 
> > > I try to get the following form programmatically, by using -post_data:
> > >
> > >  <form method=POST
> > > action="http://auctions.amazon.com/exec/varzea/subsequent-query/qid=934502155/002-2579128-3212046";>
> > > <input type="hidden" name="subsequent-query"
> > > value="%28browse%5Fcategory%20%3D%20%2268682%22%29and%28enddate%20%3D%20%22934502155-%22%29">
> > > [ etc., snipped ]
> > 
> > Submit the form once normally, interactively.  From the resulting
> > page, invoke INFO ('=').  Under Post Data, you will find the string to
> > feed to -post_data (concatenate the several lines, do not include any
> > spaces).
> 
> Dear Klaus or to whom it may concern:
> 
> I am using:
> RedHat Linux version 6
> lynx version 2.8.1rel.2 (1998)
> 
> The "=" sign in lynx gives this:
> URL: 
> http://auctions.amazon.com/exec/varzea/subsequent-query/qid=935196537/002-0360894-0549430
> 
> post_data:
> subsequent-query=%2528browse%255Fcategory%2520%253D%2520%252268286%2522%2529and%2528enddate%2520%253D%2520%2522935196537-%2522%2529
> start=50
> hint2=5
> hint3=67
> hint4=6
> hint5=
> hint6=0
> domain=56


Here is what I get, with a Debian-packaged lynx:

----------------------------------------------------------------------
                                         Information about the current document

     Lynx 2.8.1rel.2 (1998) ([1]latest release) - [2]compile time settings

File that you are currently viewing

   Linkname: Amazon.com Auctions -- Collectibles / Paper / Sheet Music
        URL:
          http://auctions.amazon.com/exec/varzea/subsequent-query/qid=934
          502155/002-2579128-3212046
    Charset: iso-8859-1 (assumed)
     Server: Netscape-Commerce/1.12
       Date: Saturday, 21-Aug-99 02:10:50 GMT
   Post Data:
subsequent-query=%2528browse%255Fcategory%2520%253D%2520%252268682%2522%2529and
%2528enddate%2520%253D%2520%2522934502155-%2522%2529&start=50&hint2=5&hint3=67&
hint4=6&hint5=&hint6=0&domain=56
   Post Content Type: application/x-www-form-urlencoded
   Owner(s): None
       size: 230 lines
       mode: forms mode
----------------------------------------------------------------------

Note that the Post Data is all one string.  

(One way to save that long post data string would be to use 'P'rint from
the INFO screen.  Or of course mouse cut-and-paste if you can.  The
method proposed by someone else, changing the original FORM to use mailto,
probably also works but seems unnecessarily complicated.)

If the post data is different from what you see on the '=' screen,
then there is the problem.  The string should _not_ appear split as you
showed it.

Have you modified the FORM somehow?  There should only be the method= and
action= attributes as you gave them (and as quoted above, near the top).
Are you using any unusual options in lynx.cfg or .lynxrc?  They should not
change anything, but to be sure, start lynx with -cfg=/dev/null and
temporarily remove .lynxrc from your home directory.

> What I type at the command prompt is this:
> address@hidden ~]:  lynx -post_data
> http://auctions.amazon.com/exec/varzea/subsequent-query/qid=935196537/002-0360894-0549430<press
> enter>
> subsequent-query=%2528browse%255Fcategory%2520%253D%2520%252268286%2522%2529and%2528enddate%2520%253D%2520%2522935196537-%2522%2529<enter>
> start=50<enter>
> hint2=5<enter>
> hint3=67<enter>
> hint4=6<enter>
> hint5=<enter>
> hint6=0<enter>
> domain=56<enter>
> ---<enter>
> 
> What I get is this:
> lynx: Can't access startfile
> http://auctions.amazon.com/exec/varzea/subsequent-query/qid=935196537/002-0360894-0549430
> address@hidden ~]:

Compare:

$ /usr/bin/lynx -post_data 
http://auctions.amazon.com/exec/varzea/subsequent-query/qid=935196537/002-0360894-0549430<press
 enter>
subsequent-query=%2528browse%255Fcategory%2520%253D%2520%252268682%2522%2529and<press
 enter>
%2528enddate%2520%253D%2520%2522934502155-%2522%2529&start=50&hint2=5&hint3=67&<press
 enter>
hint4=6&hint5=&hint6=0&domain=56<press enter>
---<enter>

What I get is a page in -dump format, with 136 links.

The post data is one long string, but it can be entered on multiple
lines - lynx just concatenates everything ignoring the line breaks.
(I don't know whether it would remove space characters, so better
don't add any.)

When I enter the data as you did, indeed I get the "Can't access
startfile" as you.  (The server is kinda broken, it should return
an error response rather than just closing the connection.)


   Klaus


reply via email to

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