I need to extract both ID and mfg.name of all foods listed in the following html https://ndb.nal.usda.gov/ndb/search/list
I am using Jsoup and pretty new to it.
here is the html source that I have to extract id and name of the food enter image description here
and here is my source code in java:
try{
Document doc = Jsoup.connect("https://ndb.nal.usda.gov/ndb/search/list?maxsteps=6&format=&count=&max=50&sort=fd_s&fgcd=&manu=&lfacet=&qlookup=&ds=&qt=&qp=&qa=&qn=&q=&ing=&offset=0&order=asc").userAgent("mozilla/17.0").get();
Elements temp =doc.select ("div.list-left");
int i=0;
for ( Element Food:temp){
i++;
System.out.println(i+ "" +Food.getElementsByTag("table").first().text());
}
}
catch (IOException e){
e.printStackTrace();
}
so here I get all information from the first page. But I need to extract ID and mfg.names of all pages.
any help will be appreciated.