Skip to content

enhancement for ATMODAT4.0: validate URLs #124

Description

@atmodatcode

This is a piece of code that we could integrate in a future checker enhancement that consists of checking the validity of the metadata URLs.

`from IPython.display import display
import requests

url="https://cera-www.dkrz.de/WDCC/ui/cerasearch/entry?acronym=LambWTyRSetAndGaleDaysOverTheNo"
try:
response = requests.get(url)
except:
print("Not a valid url!")
else:
if response.status_code != 200:
print("Not a valid url!")
else:
print('url is valid!')`

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions