aardio 文档

aardio 范例:HTML 抓取

//HTML 抓取
import console.int; 
import web.rest.htmlClient;

var htmlDoc = web.rest.htmlClient.get("https://translate.*******.com/m",{
    q="hello",sl="en",tl="zh-CN",hl="zh-CN"
});

if(htmlDoc){
    var resultContainer = htmlDoc.queryEle({"class":"result-container"})

    if(resultContainer){
        console.log(resultContainer.innerText());
    }
}

Markdown 格式