Skip to content

Commit

Permalink
request response attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
LishaRamon committed Dec 29, 2023
1 parent 5ae5c7a commit 00f3bdd
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions scripts/ingests/ingest_bard14_spectra.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,14 @@ def update_all_spectra(db):


# The website is up if the status code is 200 (checking validity of links)
request_response = requests.head(spectrum_value)
request_response = requests.head(spectrum_value, original_spectrum_value)
status_code = (request_response.status_code)

if status_code != 200:
msg = f"Link invalid:{spectrum_value}"
raise SimpleError(msg)

if status_code != 200:
msg = f"Link invalid:{original_spectrum_value}"
raise SimpleError(msg)
msg2 = f"Link invalid:{original_spectrum_value}"
raise SimpleError(msg, msg2)



print(status_code)
Expand Down

0 comments on commit 00f3bdd

Please sign in to comment.