Open alexishunzinger opened 3 months ago
I believe they are returned as a list because a granule can have many data links. For the data I've used, I believe it's always been 1 data link, and I'm not sure how common it is to have multiple. Maybe itertools.chain
for this?
links = itertools.chain(granule.data_links(access="direct") for granule in results)
[granule.data_links(access="direct") for granule in results]
returns a list of 1-item lists that contain the S3 URLs.Result:
I want the URLs just as strings in a single list. Adding 1st index to the function call yields this desired return.
[granule.data_links(access="direct")[0] for granule in results]
Result:
This is a solution any user can try, but is it kosher to update this in the earthaccess sample code? Any issues this brings?