我尝试使用python从以下网站下载结果:
http://david.abcc.ncifcrf.gov/api.jsp?type=GENBANK_ACCESSION&ids=CP000010,CP000125,CP000124,CP000124,CP000124,CP000124&tool=chartReport&annot=KEGG_PATHWAY
我试图使用mechanize之前,我意识到下载文件是用javascript编写的,而mechanize不支持它。到目前为止,我的代码打开的网页如下所示。我被困在如何访问网页上的下载链接以便将数据保存到我的机器上。在
^{pr2}$打印的结果是
<html>
<head></head>
<body>
<form name="apiForm" method="POST">
<input type="hidden" name="rowids">
<input type="hidden" name="annot">
<script type="text/javascript">
document.apiForm.rowids.value="4791928,3403495,...."; //There are really about 500 values
document.apiForm.annot.value="48";
document.apiForm.action = "chartReport.jsp";
document.apiForm.submit();
</script>
</form>
</body>
</html>
有人知道我如何选择并移动到下载文件页面并将文件保存到我的计算机上吗?在
在对这一联系进行了更多的研究之后,我想到了这个。你肯定可以用mechanize来做。在
相关问题 更多 >
编程相关推荐