【发布时间】:2018-05-11 08:01:50
【问题描述】:
网站具有以下用于检索信息的功能:
function show_best_matches(sequence_id, version_id) {
jQuery.ajax({
type: "GET",
url: 'https://unite.ut.ee/show_best_matches.php',
data:{
sequence_id: sequence_id,
version_id: version_id,
},
success:function(html) {
document.getElementById("best_matches").innerHTML = html;
}
});
}
我想使用 curl 来检索这些数据。我有所有正确的输入(序列 ID 和版本 ID),但我认为我没有将 --data 参数格式化为正确 curl。这是我尝试过的(基于其他 stackoverflow 搜索):
curl -d "sequence_id=56719" -d "version_id=7" -X GET --url https://unite.ut.ee/show_best_matches.php
感谢您的帮助。如果 curl 不是在这里使用的正确工具,我愿意接受建议。
【问题讨论】:
-
经过更多搜索后,我尝试了
{"sequence_id": "56719", "version_id": "7"},但也没有成功。
标签: jquery ajax curl web-scraping