我听说scrapy 不支持javascript。我想知道我是否可以使用 scrapy 使用 crawlspider 来抓取链接到我们的 Intranet 站点,我们的 Intranet 站点有 javascript,我相信它会在您单击链接时生成,但我不是 100% 确定。
但是视图源是由 xml-stylesheet 组成的,当我使用 firebug 时,它具有与 html 相同的数据。我也无法使用 html 标签来抓取网站,我需要使用 xml 标签才能抓取。我很困惑为什么它同时具有 html 和 xml 并且两者都有数据以及为什么我不能只抓取 xml 的 html?
我知道我可以使用 xml 标签抓取第一页,但我可以继续关注链接并继续抓取吗?
我仍然可以使用scrapy的crawlspider来抓取每个链接还是不能?如果我不能,你能推荐另一个我可以使用的工具吗?支持javascripts和后认证登录(https)。?
谢谢!
这是我使用 firebug 时的 HTML 数据(与 XML 相同的数据)
<tr>
<td class="crt">1</td>
<td class="listCell" align="center">
<td class="listCell" align="center">
<a href="/dis/packages.jsp?view=list&show=perdevice&device_gid=3651746C4173775343535452414567746D75643855673D3D53564A6151624D41716D534C68395A6337634E2F62413D3D&hwdid=probe0&subscrbid=6505550000&mdn=6505550000&maxlength=100">probe0</a>
</td>
<td class="listCell" align="center">
<a href="/dis/packages.jsp?view=list&show=perdevice&device_gid=3651746C4173775343535452414567746D75643855673D3D53564A6151624D41716D534C68395A6337634E2F62413D3D&hwdid=probe0&subscrbid=6505550000&mdn=6505550000&maxlength=100">6505550000</a>
</td>
<td class="listCell" align="center">
<a href="/dis/packages.jsp?view=timeline&show=perdevice&device_gid=3651746C4173775343535452414567746D75643855673D3D53564A6151624D41716D534C68395A6337634E2F62413D3D&hwdid=probe0&subscrbid=6505550000&mdn=6505550000&maxlength=100&date=20130716T141624949">2013-07-16 14:16:24.949</a>
</td>
<td class="cell" align="center">2013-07-16 14:16:24.949</td>
<td class="cell" align="left">1 - SMS_PullRequest_CS</td>
<td class="listCell" align="right">
<a href="/dis/profile_download?profileId=4294967295">4294967295</a>
</td>
<td class="listCell" align="center">
<a href="/dis/sessions.jsp?view=list&device_gid=3651746C4173775343535452414567746D75643855673D3D53564A6151624D41716D534C68395A6337634E2F62413D3D&hwdid=probe0&mdn=6505550000&subscrbid=6505550000&maxlength=100">view sessions</a>
</td>
<td class="listCell" align="center">
<a href="/dis/errors_agg.jsp?view=list&device_gid=3651746C4173775343535452414567746D75643855673D3D53564A6151624D41716D534C68395A6337634E2F62413D3D&hwdid=probe0&mdn=6505550000&subscrbid=6505550000&maxlength=100">view errors</a>
</td>
</tr>
这是我使用查看源 XML 样式表时的数据(与 HTML 相同的数据)
<row>
<cell type="href" href="/dis/packages.jsp?view=list&show=perdevice&device_gid=3651746C4173775343535452414567746D75643855673D3D53564A6151624D41716D534C68395A6337634E2F62413D3D&hwdid=probe0&mdn=6505550000&subscrbid=6505550000&maxlength=100">6505550000</cell>
<cell type="href" href="/dis/packages.jsp?view=list&show=perdevice&device_gid=3651746C4173775343535452414567746D75643855673D3D53564A6151624D41716D534C68395A6337634E2F62413D3D&hwdid=probe0&subscrbid=6505550000&mdn=6505550000&maxlength=100">probe0</cell>
<cell type="href" href="/dis/packages.jsp?view=list&show=perdevice&device_gid=3651746C4173775343535452414567746D75643855673D3D53564A6151624D41716D534C68395A6337634E2F62413D3D&hwdid=probe0&subscrbid=6505550000&mdn=6505550000&maxlength=100">6505550000</cell>
<cell type="href" href="/dis/packages.jsp?view=timeline&show=perdevice&device_gid=3651746C4173775343535452414567746D75643855673D3D53564A6151624D41716D534C68395A6337634E2F62413D3D&hwdid=probe0&subscrbid=6505550000&mdn=6505550000&maxlength=100&date=20130716T143636194">2013-07-16 14:36:36.194</cell>
<cell type="plain">2013-07-16 14:36:36.194</cell>
<cell type="plain">1 - SMS_PullRequest_CS</cell>
<cell type="href" href="/dis/profile_download?profileId=4294967295">4294967295</cell>
<cell type="href" href="/dis/sessions.jsp?view=list&device_gid=3651746C4173775343535452414567746D75643855673D3D53564A6151624D41716D534C68395A6337634E2F62413D3D&hwdid=probe0&mdn=6505550000&subscrbid=6505550000&maxlength=100">view sessions</cell>
<cell type="href" href="/dis/errors_agg.jsp?view=list&device_gid=3651746C4173775343535452414567746D75643855673D3D53564A6151624D41716D534C68395A6337634E2F62413D3D&hwdid=probe0&mdn=6505550000&subscrbid=6505550000&maxlength=100">view errors</cell>
</row>