【发布时间】:2015-06-15 06:13:29
【问题描述】:
在您搜索乐队和专辑前,我正在尝试在 google 上获取所有歌曲的链接: https://www.google.com/search?q=disturbed+asylum&ie=utf-8&oe=utf-8
所以我自己尝试了很多。我用过:
File input = new File("/tmp/input.html");
Document doc = Jsoup.parse(input, "UTF-8", "http://example.com/");
Elements links = doc.select("a[href]");
然后打印出所有的链接,但它并没有以这种方式将链接放在一边。然后我尝试获取 html 代码,然后通过那里搜索表格,但由于某种原因它没有拉出表格。有人有什么建议吗?
【问题讨论】:
标签: java html hyperlink google-search