I am trying to scrap a table content from a URL using java but the scraper is apparently not working correctly. I Used the java docs on inputstreamReader and other online examples but was not able to figure out what my problem is. The problem is that, the inputstreamReader is skipping two columns of every even row in the table while getting the last column. Every odd row produces the desired results. Below is my code and output.
The source table looks like this:
Lastly, the output looks like this:
In html term, each column in a row is a tag which is read in as lines. Since two columns are skipped does it mean that the inputStreamReader is skipping two line? I was thinking it would be a regEx problem but that couldn't be the cause because the rest of the output is correct. I want to be able to output or read in all rows and columns correctly to be able to proceed.