【问题标题】:html scraping POST information using aps.net and htmlAgilityhtml 使用 aps.net 和 htmlAgility 抓取 POST 信息
【发布时间】:2012-04-23 12:04:56
【问题描述】:

我正在从事一个网络抓取项目,我知道如何通过 HtmlAgilityPack 从目标页面获取某些数据。但我不知道在该页面的帖子信息中发送什么。该页面未通过查询字符串发送任何信息。该页面中有三个文本框,两个复选框和一个搜索按钮

当我用萤火虫检查按钮时,它会提供以下信息

<img border="0" align="top" onclick="javascript:PVO_PId_Search(
                document.ProtocolForm.searchplt,
                document.ProtocolForm.towcheck.checked,
                document.ProtocolForm.collateralcheck.checked,
                document.ProtocolForm.selState[document.ProtocolForm.selState.selectedIndex].value,
                document.ProtocolForm.selPltType[document.ProtocolForm.selPltType.selectedIndex].value)" onmouseout="this.className='flyOut'" onmouseover="this.className='flyOver'" alt="Search" value="PSearch" name="PSearch" onload="javascript:updateButtonWithOneTxtbox(document.ProtocolForm.searchplt,this,'v_images/Search_button.gif','v_images/Search_button_grey.gif');" src="v_images/Search_button.gif" class="flyOut">    

现在我的问题是,是否有任何可用的工具或 firefox 插件可供我使用和监控(或调试)它传递了什么样的 Post 信息?

【问题讨论】:

    标签: asp.net post web-scraping html-agility-pack


    【解决方案1】:

    您可以使用 Chrome 和/或 Safari 等中的内置 Web 开发工具来检查客户端(浏览器)和(服务器)网站之间的所有 http 请求/响应。您将在 NETWORK 检查器工具中看到它。

    但是,除非它是您的网站,或者一些有价值的教育实验,否则您是否真的可以欺骗(是的,这就是它的真正含义)到该网站的 POST(或 GET)取决于关于它是否有一些内置的保护/验证来保护它免受此类尝试的影响。

    更新:

    只需启动 Chrome 和(在 Windows 上)CTRL+SHIFT+I(Safari,它的 CTRL+ALT+I),您应该会看到 NETWORK INSPECTOR:

    更新 2: 仅供参考,如果您想要不依赖于浏览器的网络检查,Fiddler 始终是我个人工具包的一部分。

    【讨论】:

    • 嗯,我尝试的只是合法的,没有任何限制。你能命名网络检查器工具吗?
    猜你喜欢
    • 2011-07-16
    • 2012-08-15
    • 2018-10-27
    • 1970-01-01
    • 2019-07-16
    • 1970-01-01
    • 2011-07-17
    • 2019-01-25
    • 2016-09-07
    相关资源
    最近更新 更多