示例网站: http://cov-glue-viz.cvr.gla.ac.uk/mutations.php 操作示例(先打开浏览器的调试开关,以chrome为例):
代码里边的参数跟上图中,右下角红色方框保持一致, 代码: import requests url="http://cov-glue-viz.cvr.gla.ac.uk/mutations.php" params = { "lineageList": "All", "orfList": "All", "mutTypeList": "nonsyn", "minCountList": 1, "minPropList": 1.0E-6, "refreshTable": "Refresh Table" } html = requests.post(url, data=params) htmltext = html.text tabletext = htmltext.replace("</tr>", "\n") file = open("test.txt", "w") file.write(tabletext) file.close()
: