[elinks-users] -dump & javascript

Jonas Fonseca fonseca at diku.dk
Sun Jan 29 07:06:48 PST 2006


Francisco Matias Cuenca Acuña <elinks at matiascuenca.com.ar> wrote Fri, Jan 20, 2006:
> Hi, I'm trying to scrape some pages that do redirection from
> javascript. The problem is that -dump outputs the source page and not
> the final page that a regular elink session would display.
> 
> Is this a bug?

Yes and no. Some javascript is interactive so you cannot expect it in
-dump output. However, this thing is cause (if I recall correctly) by
the fact that stuff like location.href handling requires a session and
sessions are not created when dumping.

> Any idea on how I can get the final content that a user would see?

Lua scripting supports saving dumps of documents, but then you need to
also be able to trigger your script to run using some post-format hook
(ELinks only have pre-format hooks) and to quit ELinks. In other words,
you will have to do some modification of ELinks. 

-- 
Jonas Fonseca



More information about the elinks-users mailing list