Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/347.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 从js生成的表中刮取内容_Javascript_Python_Html - Fatal编程技术网

Javascript 从js生成的表中刮取内容

Javascript 从js生成的表中刮取内容,javascript,python,html,Javascript,Python,Html,我想从网站中的表中提取内容,该表似乎是在网站使用Python加载后生成的。网站html代码的一些摘录: 我相信这会显示以下表格: <table class="table table-condensed table-bordered hoverRowHand" id="contentTable"> <thead> <tr> <th width="5%"&

我想从网站中的表中提取内容,该表似乎是在网站使用Python加载后生成的。网站html代码的一些摘录:

我相信这会显示以下表格:

<table class="table table-condensed table-bordered hoverRowHand" id="contentTable">
                <thead>
                <tr>
                    <th width="5%">&nbsp;</th>
                    <th width="10%">Date Uploaded</th>
                    <th width="10%">Survey ID</th>
                    <th width="5%">Airport ID</th>
                    <th width="20%">Airport</th>
                    <th width="10%">Survey Type</th>
                </tr>
                </thead>
                <tbody>
                </tbody>
            </table>
<script src="/global/js/nfdc-suite.js"></script>
<script src="/global/bootstrap-3.3.4/js/bootstrap.min.js"></script>
<script src="/global/js/date.js"></script>
<script src="/global/js/spin.min.js"></script>
<script src="/global/js/jquery.twbsPagination.js"></script>

<script src="/nfdcApps/include/main.js"></script>


<script src="/nfdcApps/services/publicData/uddfList-dt.js"></script>
<script src="/global/js/nfdcPublicDataTable.js"></script>

上载日期
调查ID
机场ID
机场
调查类型
我相信运行这些脚本会生成表的内容:

<table class="table table-condensed table-bordered hoverRowHand" id="contentTable">
                <thead>
                <tr>
                    <th width="5%">&nbsp;</th>
                    <th width="10%">Date Uploaded</th>
                    <th width="10%">Survey ID</th>
                    <th width="5%">Airport ID</th>
                    <th width="20%">Airport</th>
                    <th width="10%">Survey Type</th>
                </tr>
                </thead>
                <tbody>
                </tbody>
            </table>
<script src="/global/js/nfdc-suite.js"></script>
<script src="/global/bootstrap-3.3.4/js/bootstrap.min.js"></script>
<script src="/global/js/date.js"></script>
<script src="/global/js/spin.min.js"></script>
<script src="/global/js/jquery.twbsPagination.js"></script>

<script src="/nfdcApps/include/main.js"></script>


<script src="/nfdcApps/services/publicData/uddfList-dt.js"></script>
<script src="/global/js/nfdcPublicDataTable.js"></script>

简单地获取网站的html显然不能提供我正在寻找的任何信息,因为我认为首先需要运行生成它的脚本

用Python这样做可行吗?或者,用Python实现这一点是不合理的


旁注:如果我在Chrome浏览器中使用“inspect element”工具,我可以看到我正在查找的内容。

您可以尝试了解js是如何生成表的,也可以使用python控制的嵌入式浏览器。不过,这类开放式问题在这里不属于主题,您可能知道,您可以尝试弄清楚js是如何生成表的,或者使用用python控制的嵌入式浏览器。不过,正如你可能知道的那样,这种开放式的问题在这里是无关紧要的