How can I get the href attribute from a dynamic link using java?
I am trying to fetch dynamic links from this site but have not been able to retrieve them.
But I retrieved links, i.e. static links successfully from this website
Sample code:
public class JavaScript {
public static void main(String[] args) throws IOException {
Document doc = Jsoup.connect("http://economictimes.indiatimes.com/archive.cms").get();
Elements links = doc.select("a[href]");
for (Element element : links) {
System.out.println(element.attributes());
}
}
}
Now I want to fetch dynamic links from a website, that is, when we click on a date, it calls a function and generates a link. How can I get these links using JAVA?
+3
source to share