Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More sources for urls for Opera additionalUrls field #725

Merged
merged 9 commits into from
Oct 16, 2023
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
Loading