I've changed grab_data to accept command line parameters, and to output data to stdout.