Source source = new Source(htmlContent); Element element = source.getElementById("elementId"); List<Element> elements = source.getElementsByTag("tagName"); List<Element> elements = source.getAllElements(".className"); String attributeValue = element.getAttributeValue("attributeName"); URLConnection connection = url.openConnection(); connection.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3"); source.setEncoding("UTF-8"); connection.setRequestProperty("Cookie", "key=value");


上一篇:
下一篇:
切换中文