我如何抓取一个似乎是用javascript生成的不能直接打开的aspx网站

我如何抓取一个似乎是用javascript生成的不能直接打开的aspx网站,javascript,java,python,html,asp.net,Javascript,Java,Python,Html,Asp.net,我发现您无法直接打开我最终试图获取的链接:。但您可以直接在之前打开链接:。 我的问题是,我试图最终在python中导航到web scraper中的第一个链接。但是,即使尝试打开我在Chrome这样的常规浏览器上测试和验证的第二个链接,出现的html与在Chrome中浏览到该页面时该页面在查看页面源上的html并不相同。这个问题在使用、urllib、BeautifulSoup、requests、RoboBrowser和requests_html with html.render时一再发生。因此,我

我发现您无法直接打开我最终试图获取的链接:。但您可以直接在之前打开链接:。 我的问题是,我试图最终在python中导航到web scraper中的第一个链接。但是,即使尝试打开我在Chrome这样的常规浏览器上测试和验证的第二个链接,出现的html与在Chrome中浏览到该页面时该页面在查看页面源上的html并不相同。这个问题在使用、urllib、BeautifulSoup、requests、RoboBrowser和requests_html with html.render时一再发生。因此,我尝试使用Selenium,因为我了解到,如果页面需要启用javascript,则需要使用Selenium。但当我在selenium中打开时,在单击accept之前,浏览器会重定向到基本网站()。我看到其他一些人正在抓取有aspx变量的网站,比如这个网站的uuu VIEWSTATE,但我不确定这个网站应该采取什么方法。我更喜欢python,但如果java或其他语言中有更简单的解决方案,我愿意使用它!那么,对于这个站点,我应该采取什么方法呢?这是网站的html:


公共索引搜索
(函数(a){var d=document;if(d.readyState==“complete”)返回;var w=window;var s=d.currentScript;addEventListener(“QDDFxBgUl”,函数f(e){e.stopImmediatePropagation();removeEventListener(“QDDFxBgUl”,f);e.detail.init(“a_sftyz2aqaj-rslifzn8fptkyzu3jxznntkqdt7tyhx8cubs1ggaxv6aso=”,“CSmobeZZZZZVWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWHHHHHQ-LQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ[0,0]],[[“POST”],[0,1,0,3,0]]]],a)},对);s&&s.parentNode.removeChild;d.write(“”)}(参数类型==“未定义”?无效0:参数))
//
阿贝维尔县

第八司法巡回法庭
公开索引

函数hidemodal(){ $find('mpeBID').hide(); 返回false; } //
县或任何机构、官员、当选官员或 县政府雇员保证任何信息的准确性、可靠性或及时性 本网站上的信息,并不对由此造成的任何损失负责 对此类信息的准确性、可靠性或及时性的依赖, 包括但不限于附带损害和间接损害 出版物按“原样”提供,不提供任何形式的担保 明示或默示,包括但不限于 适销性、适用于特定目的或不侵权 县保留南卡罗来纳州侵权索赔中规定的所有豁免权 表演。

此类信息的某些部分可能不正确或不是最新信息。任何人或实体 依赖于从本网站获得的任何信息,他或她自行负责 风险。此外,本网站中的任何内容都不是官方记录 由县政府或民选官员负责。所有官员 该县和全县民选官员办公室的记录在 在其各自的办公室存档,并可在 办公室。

准备或归档文件以供官方记录或归档的人 记录可能不包括社会保险、驾照、州政府 身份证、护照、支票账户、储蓄账户、信用卡或 银行账户中的借记卡号、个人识别码(PIN)或密码 文件,除非法律明确要求。个人有权 要求登记契约或法院书记从图像或副本中删除 在公开的互联网网站或 契约登记册或契约登记员使用的公开互联网网站 法院要展示公共记录、任何社会保险、驾驶执照、州 身份证、护照、支票账户、储蓄账户、信用卡或 借记卡号、个人识别码(PIN)或密码 包含在正式记录中。请求必须以书面形式提出,并且 通过邮件、传真、电子传输或亲自送达 契约登记册或法院书记官登记册。申请书必须指明 包含社会保险、驾照、, 身份证、护照、支票账户、储蓄账户、信用卡、, 借记卡号、个人识别码(PIN)或密码 修订。根据要求进行的修订不收取任何费用。

访问南卡罗来纳州司法部公共索引网站 通过网站数据刮刀或任何类似软件,旨在通过自动化系统从网站中发现和提取数据, 明确禁止为收集此类数据而重复查询


我已阅读并接受此免责声明,并对使用此信息负责:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>
    Public Index Search
</title>
    <!-- Set the viewport width to device width for mobile -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=yes" /><link href="../SCJDCommonWebFiles/SCJDStyles.css" rel="stylesheet" type="text/css" /><link rel="shortcut icon" href="../SCJDCommonWebFiles/Images/favicon.ico" type="image/x-icon" /><link rel="icon" href="../SCJDCommonWebFiles/Images/favicon.ico" type="image/ico" />
</head>
<body id="MainPage">
    <form method="post" action="./" id="form1">
<div class="aspNetHidden">
<input type="hidden" name="ContentPlaceHolder1_ToolkitScriptManager1_HiddenField" id="ContentPlaceHolder1_ToolkitScriptManager1_HiddenField" value="" />
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTE0MjkzMTY0NDZkZO9AfFymJFs2oYtw0NdvHHX24ken" />
</div>

<script nonce="44zvId2606ALq6COtXWax194">(function(a){var d=document;if(d.readyState==="complete")return;var w=window;var s=d.currentScript;addEventListener("QDDFxBgUl",function f(e){e.stopImmediatePropagation();removeEventListener("QDDFxBgUl",f);e.detail.init("A_SftyZ2AQAAj-rSLifZN8fPTkYzU3JXZNntKqDT7TyHx8CUbCjSP1gGAxv6ASO_Cfaucr5iwH8AAOfvAAAAAA==","csmObzTJRl8Pi6U30n1f9=dIx47rhMuWotjZV2gpkB5SvDQwyGNYaHFq-LCK_AeEX",[],[537446516,1519189668,1031653497,413076837,861185844,1429182448,1631016849,396020441],"44zvId2606ALq6COtXWax194","44zvId2606ALq6COtXWax194",[[/(?:)/,/^((?=.*publicindex\.sccourts\.org$))/i,/^((?!\/$)(?!\/$))/i,/(?:)/],[[["GET"],[0,1,0,2,0]],[["POST"],[0,1,0,3,0]]]],a)},true);s&&s.parentNode.removeChild(s);d.write("<script "+('nonce="'+"44zvId2606ALq6COtXWax194"+'" ')+('src="'+"/b540ee9e345645bca774a11fc6c63a7a.js?seed=AMBGpiZ2AQAAwywUUZtzcNTN8yJXGAkN6cV3iln-3mGyunI6jxqxVqqUf0jR"+'" ')+('id="'+"593e2ee16e58f519a5d512bd17d93da9"+'"')+"></scr"+"ipt>")}(typeof arguments==="undefined"?void 0:arguments))</script><script type="text/javascript">
//<![CDATA[
var theForm = document.forms['form1'];
if (!theForm) {
    theForm = document.form1;
}
function __doPostBack(eventTarget, eventArgument) {
    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        theForm.__EVENTTARGET.value = eventTarget;
        theForm.__EVENTARGUMENT.value = eventArgument;
        theForm.submit();
    }
}
//]]>
</script>


<script src="/Abbeville/PublicIndex/WebResource.axd?d=yHSk03n8qhGuYU3dqttnQ71qTt_0El3n1mxBXim4Y_-Y3mTP08Bvg1wOhE6CNGMfa0pKDFyPqFYCSLv2UBjX7AKLbHI1&amp;t=636776545224055265" type="text/javascript"></script>


<script src="/Abbeville/PublicIndex/ScriptResource.axd?d=Mkw4QIfUysnyQFhWpSU3cpRAOR84s719g9N0uJb6WluyvHTwL48NXPe4rwN0cPC7Gr6I9pZZph6TlEkVqfYsPXI7ZHd1OJzbro9C70-Bx13mFOPo0&amp;t=27117261" type="text/javascript"></script>
<script src="/Abbeville/PublicIndex/ScriptResource.axd?d=d8-wk7BomsPtH4YvLTJ1UzDNDQNd_YVgR7altkItLWhH5yOCDaUGJHcNTeOKDRiE1M_grO76wv2e-vwpgB-KU5rZQ7UxIpKqWPL9zNh13ZS_I0GMMssjEQcya90iKRQSiH2ymA2&amp;t=27117261" type="text/javascript"></script>
<div class="aspNetHidden">

    <input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="1B7E8EBE" />
    <input type="hidden" name="__PREVIOUSPAGE" id="__PREVIOUSPAGE" value="BsW216wqQxCtuIvrGWmJQq2SzKwzsohf-kqWPg_ixAZV5lsccN3qLaQAoEWdFDudUVNmZqLDHlVu_jjRlouMpBTtLyyx8OET2D0coFsN4lkn11MM0" />
    <input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEdAANnUhit7/TqA0EIrEA5S0S0kfXFdoRld1R/CA4tdNG91yIhI+6i/cUuX4RsMQK8Skk79cNANwPzNawq72wqYHHLPOBqiw==" />
</div>
        <div id="pagewrapper">
            <div id="pagecontent">
                <table class="pageHeading" enableviewstate="false">
                    <tr>
                        <td align="left">
                            <img id="ImageLeft" class="headingImage" src="../SCJDCommonWebFiles/Images/HeaderLeft.jpg" alt="Left Heading Image" align="left" style="border-style:None;" />
                        </td>
                        <td style="text-align: center">
                            <span id="LabelHeadingCounty">Abbeville County</span>
                            <br />
                            <span id="LabelHeadingCircuit">Eighth Judicial Circuit</span>
                            <br />
                            <span id="LabelApplicationName">Public Index</span>
                        </td>
                        <td>
                            <img id="ImageRight" class="headingImage" src="../SCJDCommonWebFiles/Images/HeaderRight.jpg" alt="Right Heading Image" align="right" style="border-style:None;" />
                        </td>
                    </tr>
                </table>
                <hr class="horizontalSeparator" />
                <div id="linkBar" class="linksSection">
                    <a id="HyperLinkHome" href="http://www.abbevillecountysc.com">Abbeville County Home Page</a>
                    <?xml version="1.0" encoding="utf-8"?>
<a href="http://www.sccourts.org/">South Carolina Judicial Department Home Page</a>
<a href="http://www.sc.gov/">SC.GOV Home Page</a>
                </div>
                <hr class="horizontalSeparator" />
                <div>
                    
    <script type="text/javascript">
        function hidemodal() {
            $find('mpeBID').hide();
            return false;
        }

    </script>
    <script type="text/javascript">
//<![CDATA[
Sys.WebForms.PageRequestManager._initialize('ctl00$ContentPlaceHolder1$ToolkitScriptManager1', 'form1', [], [], [], 90, 'ctl00');
//]]>
</script>

    <div id="disclaimsection" class="disclaimer">
        <span id="ContentPlaceHolder1_LabelDisclaimer" class="disclaimerText"><br/>Neither the County nor any agency, officer, elected official or
employee of the County, warrants the accuracy, reliability or timeliness of any
information on this web site and shall not be liable for any losses caused by
such reliance on the accuracy, reliability or timeliness of such information,
including, but not limited to incidental and consequential damages. This
publication is provided &quot;as is&quot; without warranty of kind, either
expressed or implied, including, but not limited to, the implied warranties of
merchantability, fitness for a particular purpose or non-infringement. The
County maintains all immunities as provided in the South Carolina Tort Claims
Act.
<br/><br/>Portions of such information may be incorrect or not current. Any person or entity who
relies on any information obtained from this web site does so at his or her own
risk. In addition, nothing contained within this web site is an official record
of the County or the elected officials responsible therefore. All official
records of the County and the offices of countywide elected officials are on
file in their respective offices and may be reviewed by the public at those
offices.
<br/><br/>A person preparing or filing a document for recordation or filing in the official
records may not include a social security, driver's license, state
identification, passport, checking account, savings account, credit card, or
debit card number, or personal identification (PIN) code, or passwords in the
document, unless expressly required by law. An individual has a right to
request a register of deeds or clerk of court to remove, from an image or copy
of an official record placed on a publicly available Internet web site or on a
publicly available Internet web site used by a register of deeds or clerk of
court to display public records, any social security, driver's license, state
identification, passport, checking account, savings account, credit card, or
debit card number, or personal identification (PIN) code, or passwords
contained in an official record. The request must be made in writing and
delivered by mail, facsimile, or electronic transmission or in person, to the
register of deeds or clerk of court. The request must specify the
identification page number that contains the social security, driver's license,
state identification, passport, checking account, savings account, credit card,
debit card number, or personal identification (PIN) code, or passwords to be
redacted. There is no fee for the redaction pursuant to request.
<br/><br/><p>Access to the South Carolina Judicial Department Public Index web sites 
by a site data scraper or any similar software intended to discover and extract data from a website through automated, 
repetitive querying for the purpose of collecting such data is expressly prohibited.</p>
<br/>
<p style='text-align: center;font-weight: bold'>I have read and accept this disclaimer and responsibility for the use of this information:</p></span>
        <div id="ContentPlaceHolder1_PanelDiscButtons" class="centeredDiv" style="width:50%;">
    
            <br />
            <input type="submit" name="ctl00$ContentPlaceHolder1$ButtonAccept" value="Accept" id="ContentPlaceHolder1_ButtonAccept" title="Accept Disclaimer" class="actionButton" />
            <input type="submit" name="ctl00$ContentPlaceHolder1$ButtonDecline" value="Decline" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$ContentPlaceHolder1$ButtonDecline&quot;, &quot;&quot;, false, &quot;&quot;, &quot;http://www.abbevillecountysc.com&quot;, false, false))" id="ContentPlaceHolder1_ButtonDecline" title="Decline Disclaimer" class="actionButton" />
            <br />
        
</div>
    </div>

                </div>
                <hr class="horizontalSeparator" />
                <div id="pagefooter" class="scjdcopyright">
                    <span id="Copyright">CMSWeb 6.1 © 2019 South Carolina Judicial Branch • All rights reserved </span>
                </div>
            </div>
        </div>
    </form>
</body>
</html>
Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

    Dim rst As DataTable
    rst = MyRst("SELECT ID, HotelName, City FROM tblHotels ORDER BY HotelName")

    GridView1.DataSource = rst
    GridView1.DataBind()

End Sub
   Dim myGridrow As GridViewRow = GridView1.SelectedRow

   TextBox1.Text = GfIX(myGridrow, "HotelName")
Did not write loops to render the grid
Did not write loops to spit out HTML
   ' before we try to load? - lets check if we have info
    If Nz(Session("ContactID"), 0) = 0 Then
        ' we don't have a contact id - jump to project page
        Response.Redirect("~/Portal/MyProjects")
        Exit Sub
    End If