how do I pull data from hmtl source code into a variable in java?

edited November 2016 in How To...

Hi Everyone, I'm a noob and could really use some help with a piece of code I'm trying to write to make my life a little bit easier at work lol. I'm using an array/for loop to do a search on a website and I would like for java to navigate to each search result than pull data from there and store it in a file. There's no id or class in the source code so I can't do anything like variable == document.getElementByClassName("some element").value. This is the website and my script enters any zip code value that the user would input. It assigns that value into the search box than does a .click() on the search button. The search results are stored in an array and a for loop navigates to each result. Once it navigates to the result I need to pull specific data like doctors address / name / phone number etc. I don't want to grab all the text on the site, just some of it. Please help me. I haven't been able to figure out how to do this. There's an option to view the results in a JSON format and I'm not sure how to use that to my advantage. Thank you in advance.


Sign In or Register to comment.