从js生成的表中抓取内容

时间:2017-03-20 21:04:21

标签: javascript python html

我想从网站中的表格中提取内容,该网站似乎是在使用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>

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

这与Python有关吗?或者用Python完成这件事是不合理的。

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

0 个答案:

没有答案
相关问题