从asp页面获取数据
我想知道是否有办法获取从 ASP 页面生成的 html。我试图从页面中提取一个表,并且我愚蠢地使用了静态 html 页面,这样我在测试代码时就不必不断查询该页面所在的服务器。我编写的用于从页面抓取未标记表格的 JavaScript 代码有效。然后当我将其付诸实际页面时,发现ASP页面并没有生成URL上有jquery .get请求的可查看页面。
有什么方法可以在页面中查询我需要的表,以便 ASP 页面根据请求返回有效页面?
(我也仅限于此使用 javascript 和 perl,其驻留的服务器将不会运行 php,并且我不想学习 ASP.NET 通过添加专有软件的问题来解决这个问题)
I am wondering if there is anyway to grab the html that is generated from an ASP page. I am trying to pull a table from the page, and I foolishly used a static html page so I would not have to be constantly querying the server where this page resides while I tested out my code. The javascript code I wrote to grab to unlabeled table from the page works. Then when I put it into practice with the real page and found that the ASP page does not generate a viewable page with a jquery .get request on the URL.
Is there any way to query the page for the table I need so that the ASP page returns a valid page on request?
(I am also limited to using javascript and perl for this, the server where this will reside will not run php and I have no desire to learn ASP.NET to solve this by adding to the issue of proprietary software)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试获取表的页面是否位于同一域中?必须如此。如果没有,您必须使用代理或 XMLHttpRequest Level 2 访问控制标头。
Is the page that is trying to get the table on the same domain? It needs to be. If not you have to use a proxy or XMLHttpRequest Level 2 access control headers.
使用Perl的LWP模块查询ASP.NET页面以获取所需的信息。我会在进行 WireShark 跟踪时在 Web 浏览器中打开目标页面,以便您可以准确地了解浏览器如何调用该页面并获取表信息,然后使用 LWP 执行相同的调用。
Use Perl's LWP module to query the ASP.NET page to get the required information. I would open the target page in a web browser while doing a WireShark trace so you can tell exactly how the browser is calling the page and getting the table information, and then perform the same call with LWP.