Download txt data

Hi all, is there a way to download the data as a txt file from API? For instance i would like to download the electronic and phononic structure of a material, i perform with MPRester(api_key=‘----’) as mpr:
bs = mpr.get_bandstructure_by_material_id(‘mp-602’) but then how can i download the data as txt? Thanks in advance