0
我想从使用JSOUP的网页获取SELECT节点。我有的问题是,我只是在SELECT节点中获得第一个OPTION节点。当我检查上述网页的html源代码时,我发现SELECT节点中有9个OPTION节点。这是我使用的Java代码:jsoup没有从网页获取一些html标签
Document doc;
Elements stops;
try {
doc = Jsoup
.connect("http://www.miamidade.gov/transit/mobile/scriptCheck.asp?
script=yes&CurrentPage=/transit/mobile/schedules.asp?route=3")
.userAgent(" Mozilla/5.0")
.timeout(30000)
.get();
stops = doc.getElementsByTag("select");
for (Element option : stops) {
System.out.print(option.text());
}
} catch (IOException e) {
e.printStackTrace();
}