bug-wget
[Top][All Lists]
Advanced

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

Re: [Bug-wget] ot: clicking email links advice


From: Tim Rühsen
Subject: Re: [Bug-wget] ot: clicking email links advice
Date: Thu, 05 Jan 2017 21:25:42 +0100
User-agent: KMail/5.2.3 (Linux/4.8.0-2-amd64; KDE/5.28.0; x86_64; ; )

On Donnerstag, 5. Januar 2017 09:34:39 CET Ander Juaristi wrote:
> Hi,
> 
> On 28/12/16 05:57, address@hidden wrote:
> > is there a way to run wget with that url and, tell it to 'press' one of
> > the buttons?
> 
> Not directly as you describe. Wget does not submit web forms.
> 
> You would need to write an external application to parse the HTML,
> generate the target link and then feed that link to wget.
> 
> Or,
> 
> You could use wget2, which we're designing as a library, although it's
> still in pre-alpha. It has functions to extract links from an HTML
> document (see the example in [1]), although I don't know if it can
> extract URLs from <form action="..."> fields as well, which is what I
> guess you need. Maybe @Tim can give more details on this.

The 'action' URL will not be followed automatically by wget, it is filtered out 
by purpose. Libwget should parse it, maybe wget2 does not filter it out right 
now - but this should be fixed.

Basically you need to parse HTML for more infos - the library contains a 
scanner and example code to use it. If you want to go that way, you need some 
knowledge/background about the HTML form mechanism (as Dale pointed out).

If you just have one use case, take a browser's 'development' tools (Firefox 
and Chromium have those), fill in your form as usual and just see what is 
transferred to the server. You can then set header lines and content via wget.
Cookies normally play a role when it comes to login/authentication.

Tim

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

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