title: Getting links from the table and all the tabs of a website using Jsoup
body: <p>I'm new to web scraping so the question may not have been framed perfectly. I am trying to extract all the drug name links from a given page alphbetically and as a result extract all a-z drug links, then iterate over these links to extract information from within each of these like generic name, brand etc. I have a very basic code below that doesn't work. Some help in approaching this problem will be much appreciated.</p>
  
  <pre><code>public class WebScraper {
    public static void main(String[] args) throws Exception {
  
      String keyword = "a"; //will iterate through all the alphabets eventually
      String url = "http://www.medindia.net/drug-price/brand-index.asp?alpha=" + keyword; 
  
      Document doc = Jsoup.connect(url).get();
      Element table = doc.select("table").first();
      Elements links = table.select("a[href]"); // a with href
      for (Element link : links) {
      System.out.println(link.attr("href"));
    }
  }
  </code></pre>