Scenario. The website that I use to study stock data has a link on the Export Data to Spreadsheet page. The URL displayed when you hover over the export link has the form http://www.stocksite.com/historical/export.php?symbol=C .
Question: Rather, to manually visit the page for each stock, I would like to automate the task. From Java, how can I programmatically call a site with a stock symbol and save the exported CSV file? The URL class and URLConnection seem like an obvious place to start, but I'm not sure where to go from there.
source
share