0

I have written a java code that extracts information from a website. There is a table that is only triggered when it is clicked (Fragments? I am new to HTML). I've tried looking for the id through the HTML of the website, but it is not found. Like I said, it only shows up on the HTML when clicked. I'm thinking of keeping the URL connection open long enough to trigger the element, then extract the information. How do I go about this?

So far, my program extracts information given on the page before the link.

CM9
  • 13
  • 6

1 Answers1

0

My first impression is that the site uses javascript to load that particular table. Most probably, the HTML parser does not execute javascript on the page, so you will not be able to get any dynamic content. Executing javascript in java can be tricky, but there are several paths to start, see:

Parsing web page containing dynamic javascript objects

Another way is to analyze the page manually, and find out what that specific js code does, and try to replicate that in your java code.

Community
  • 1
  • 1
P.Péter
  • 1,527
  • 16
  • 39
  • Thank you. I decided to go another route and do it manually like you said, but I am going to use AutoHotkey to save my time. Thank you again. – CM9 May 22 '15 at 16:22