Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to download an entire site:

Unfortunately, instead of the standard href tag, the page uses javascript functions to generate links:

<td><div align="center" dir="rtl">69821</div></td>
<td onclick='go2("69821");' style="text-decoration:none;color:blue;cursor:pointer;word-wrap:nowrap"><div align="right" dir="rtl">  </div></td>
<td style="text-decoration:none;color:blue;cursor:pointer;word-wrap:nowrap"><div align="center" dir="ltr">1</div></td>

I've tried wget and downthemall, but they can't handle this kind of linking mechanism.

How do I download an entire site with js links instead of href tags?

share|improve this question
Possibly related:… – gronostaj Jun 10 '13 at 7:45
I fear there will be no solution available. Those links are homebrewed (somehow pretty evil) and following them would require the downloader to have a JavaScript engine which runs the code and checks for window.location = or any other means of redirection. I doubt that such a program exists (especially that parsing JavaScript part). – Bobby Jun 10 '13 at 11:18
Related question about JS links: How to open stubborn javascript links in a new tab or new window? – Karan Jun 10 '13 at 17:50
I'm also looking for a way to get wget to follow "javascript links". But it doesn't have to be as complicated as having a javascript engine! Is it possible to apply custom transformations to the downloaded html files, for instance "javascript='open(343)'" → "article.php?id=343" ? – Manu May 18 '14 at 10:17

You must log in to answer this question.

Browse other questions tagged .