最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - wget js redirection - Stack Overflow

programmeradmin0浏览0评论

When I was using wget I came to the page witch using JS redirections. Something like this:

<script language="JavaScript1.2">
var s = "i_08/0101/index.php3";
location.href=""+s;
</script>

Could wget follow this redirection or is there any other method to solve this.

When I was using wget I came to the page witch using JS redirections. Something like this:

<script language="JavaScript1.2">
var s = "i_08/0101/index.php3";
location.href=""+s;
</script>

Could wget follow this redirection or is there any other method to solve this.

Share Improve this question asked Jun 12, 2011 at 18:24 ghighi 7252 gold badges9 silver badges21 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 4

You can check the DHTMLGET tool that was built for FAE. The goal of this project is to provide basic inline js and onload events on top of a modified wget:

The dhtmlget utility is to create local copies of websites similar to WGET utility in unix. It supports http, https protocols, as well as retrieval through http proxies.The main difference of DHTMLGET and WGET is the dhtmlget ExecuteS onload and inline javascript. It was developed for use in the Illinois Functional Accessibility Evaluator to analyze websites that use javascrpt to generate content for accessibility features.

A simple Google search can lead you to an interesting page about wget js feature request.

No.

wget is used for downloading the remote location as-is and does not act as a web browser, which parses the contained JavaScript.

Note that wget does follow header redirects (such as 301, for example).

I tried using lynx -source but sadly, this will result in a non-parsed web page as well. An alternative solution to this problem would be to write a script that downloads the page, then parses it and downloads possible references automatically, but I'll leave that up to you.

发布评论

评论列表(0)

  1. 暂无评论