Skip to content

Commit

Permalink
Merge pull request #725 from asfadmin/test
Browse files Browse the repository at this point in the history
More sources for urls for Opera additionalUrls field
  • Loading branch information
SpicyGarlicAlbacoreRoll authored Oct 16, 2023
2 parents 3cd0926 + 2d79abd commit 5823146
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion SearchAPI/CMR/Translate/parse_cmr_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,12 @@ def float_or_none(a):
result['fileName'] = result['granuleName'] + '.' + urls[0].split('.')[-1]

if result.get('product_file_id', '').startswith('OPERA'):
result['additionalUrls'] = [url for url in get_all_vals('./OnlineAccessURLs/OnlineAccessURL/URL') if not url.endswith('.md5') and not url.startswith('s3://')]
result['beamMode'] = get_val(attr_path('BEAM_MODE'))
accessUrls = [url for url in get_all_vals('./OnlineAccessURLs/OnlineAccessURL/URL') if not url.endswith('.md5') and not url.startswith('s3://') and not 's3credentials' in url]
OnlineResources = [url for url in get_all_vals('./OnlineResources/OnlineResource/URL') if not url.endswith('.md5') and not url.startswith('s3://') and not 's3credentials' in url]
result['additionalUrls'] = list(set([*accessUrls, *OnlineResources]))
result['configurationName'] = "Interferometric Wide. 250 km swath, 5 m x 20 m spatial resolution and burst synchronization for interferometry. IW is considered to be the standard mode over land masses."
result['browse'] = [url for url in get_all_vals('./AssociatedBrowseImageUrls/ProviderBrowseUrl/URL') if not url.startswith('s3://')]
return result


Expand Down

0 comments on commit 5823146

Please sign in to comment.