我希望能夠在特定的URL
(例如,)上抓取N
線條(以新行開始的HTML文本內容)。 www.sitename.com
並將它們作爲strings
存儲在一個數組中。用於在網站上抓取線條的Java URL庫
像
public void grabLines(){
//create instance of class from imported library
//pass sitename into it
//from the instance, call a method for grabbing the lines on the site and pass in "N" as a parameter
//the method returns an array/list of N Strings that I can access later
}
是否有本地Java庫我可以導入做到這一點?它允許我做我想要的東西嗎?
謝謝
什麼是在網站上線? – Sjoerd
你的意思是,HTML內容的行?不是url本身的一部分? – Bozho
文本行......以不同的行開頭的句子@Bozho yes是指HTML內容的行。 – algorithmicCoder