java - How to return values from option tag -
i trying return information flightradar24.com using jsoup.
information need displayed in drop-down box.
here code:
public static void main(string[] args) { try { document doc = jsoup.connect("http://www.flightradar24.com/").get(); elements radarcode = doc.getelementsbytag("option"); for(int i=0; i<radarcode.size(); i++) { system.out.println(radarcode.get(i).text() + "\n"); } }catch(exception e) { e.printstacktrace(); } }
i trying return radar information displayed. if go onto website , click on filter on left hand side, box display. find radio button says "radar" , should show drop down box. drop down box 1 try information from.
i think pshemo's comment correct. jsoup great static site, minute there need data generated javascript, need upgrade solution. there many ones, pulling in headless browser htmlunit or phantomjs, or selenium (which can tie headless or standard browser firefox). depending on project, i'd start htmlunit or selenium htmlunit.
Comments
Post a Comment