简体   繁体   English

如何在网站上获取不会更改URL的正确页面

[英]How to get correct page on site that doesn't change URL

I need to go around a site using java programmatically but the site doesn't change the url when linked is clicked. 我需要以编程方式使用Java遍历一个站点,但是单击链接时该站点不会更改url。

Site: http://cliqa.nana10.co.il/ 网站: http//cliqa.nana10.co.il/

On the right you have a bar with some links, click them and you will see that while the content changes the url doesn't change. 在右侧,您将看到一个带有一些链接的栏,单击它们,您将看到,即使内容更改,URL也不会更改。 how can i achieve programmatically this mouse click on one of the links in Java, I thought about HTTP POST but what exactly I'm going to send? 我如何以编程方式实现此鼠标单击Java中的链接之一,我想到了HTTP POST,但究竟要发送什么? an example would be much appreciated. 一个例子将不胜感激。

These links use JavaScript to trigger an AJAX request and refresh only the center of the page. 这些链接使用JavaScript触发AJAX请求并仅刷新页面的中心。 Use FireBug inside Firefox to sniff the network requests and see which requests are executed on each click. 在Firefox中使用FireBug嗅探网络请求,并查看每次单击执行哪些请求。 Or use a programmatic web browser like HtmlUnit which will handle JavaScript as your web browser does. 或使用像HtmlUnit这样的程序化Web浏览器,它将像您的Web浏览器一样处理JavaScript。

You need to look at the actual HTTP request being sent. 您需要查看实际发送的HTTP请求。 You can do this Chrome with the built in Inspect Element tool or Firebug in Firefox (or Live HTTP Headers). 您可以使用内置的Inspect Element工具或Firefox中的Firebug(或Live HTTP标头)来执行此Chrome。 I prefer to use Burp Suite 's intercepting proxy to see this. 我更喜欢使用Burp Suite的拦截代理来查看此内容。

You can try charles (http://www.charlesproxy.com/). 您可以尝试查尔斯(http://www.charlesproxy.com/)。 Check the section on JAVA APPLICATION PROXY CONFIGURATION at http://www.charlesproxy.com/documentation/configuration/browser-and-system-configuration/ . http://www.charlesproxy.com/documentation/configuration/browser-and-system-configuration/上检查有关JAVA APPLICATION PROXY CONFIGURATION的部分。 You can inspect and change request sent from your java application. 您可以检查和更改从Java应用程序发送的请求。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM