On Thursday 02 January 2014 13:35:02 Darshit Shah wrote: > On Thu, Jan 2, 2014 at 1:20 PM, <[email protected]> wrote: > > I ocassionally get html emails containg clickable links as so: > > > > > > http://xxx.domtld.cmime email parserom/portal?id=a0590000007JM3UAAW0019999999KlOrcAAF140102 > > 111731729&key=b024bb39c058d395037a907b7b6436e0&resp=1 > > > > I'd like to try to parse the email for the link, and, 'click it' > > > > is wget appropriate tool for this ? > > While wget has *some* HTML parsing capabilities, it is not the correct tool > for this job. Once you have the link, you can download the contents through > wget.
Darshit, you are is basically right. But you can use the tool 'munpack' from the package 'mpack' to split RFC-822 emails into single parts and then process the HTML part(s) with wget. Example: 1. Save your email as xxx.mbox 2. Extract the contents $ munpack -t xxx.mbox part1 (text/plain) part2 (text/html) 3. Process 'part2' with wget $ wget --force-html -i part2 ... Regards, Tim
